yinjie1_vip
2014-11-17 12:10
浏览 985

JACOB 怎么设置Word文件的自定义属性

ActiveXComponent word = new ActiveXComponent("Word.Application");
word.setProperty("qqq", new Variant(12));
Dispatch documents = word.getProperty("Documents").toDispatch();
String docPath="c:/123213.docx";
Dispatch doc = Dispatch.call(documents, "Open", docPath).toDispatch();
System.out.println("+++++++++++11+++++++++++");
//Dispatch.putRef(doc, "Enovia_Object_Id", new Variant(12));
System.out.println("++++++++++++22++++++++++");
//Dispatch selection = Dispatch.get(word, "Selection").toDispatch();

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

相关推荐 更多相似问题