2 yinjie1 vip yinjie1_vip 于 2014.11.17 20:10 提问

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();

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!