问题描述
- 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();
时间: 2024-11-05 18:26:58