ActiveXComponent doc=new ActiveXComponent("word.Application");
//设置是否显示打开
Dispatch.put(doc, "Visible", new Variant(true));
//打开具体的工作簿
Dispatch documents = doc.getProperty("Documents").toDispatch();
Dispatch word = Dispatch.call(documents,"Open",path).toDispatch();
//设置打印属性并打印
Dispatch.callN(word,"PrintOut",new Object[]{
Variant.VT_MISSING, Variant.VT_MISSING, new Integer(1),
new Boolean(false),PRINT_NAME, new Boolean(true),Variant.VT_MISSING, ""
});
//关闭文档
Dispatch.call(word, "Close", new Variant(false));
调用java虚拟机打印将word转换为pdf时 ActiveXComponent doc=new ActiveXComponent("word.Application"),那么ceb转pdf时应该new ActiveXComponent("“)参数写什么呢?求大神知道,十分感谢。