/**
* WORD转HTML
*
* @param docfile
* WORD文件全路径
* @param htmlfile
* 转换后HTML存放路径
*/
public boolean wordToHtml(String docfile, String htmlfile) {
// 启动word应用程序(Microsoft Office Word 2007)
ActiveXComponent app = new ActiveXComponent("Word.Application");
try {
// 设置word应用程序不可见
app.setProperty("Visible", new Variant(false));
// documents表示word程序的所有文档窗口,(word是多文档应用程序)
Dispatch docs = app.getProperty("Documents").toDispatch();
// 打开要转换的word文件
Dispatch doc = Dispatch.call(docs, "Open", docfile, false, tr
* WORD转HTML
*
* @param docfile
* WORD文件全路径
* @param htmlfile
* 转换后HTML存放路径
*/
public boolean wordToHtml(String docfile, String htmlfile) {
// 启动word应用程序(Microsoft Office Word 2007)
ActiveXComponent app = new ActiveXComponent("Word.Application");
try {
// 设置word应用程序不可见
app.setProperty("Visible", new Variant(false));
// documents表示word程序的所有文档窗口,(word是多文档应用程序)
Dispatch docs = app.getProperty("Documents").toDispatch();
// 打开要转换的word文件
Dispatch doc = Dispatch.call(docs, "Open", docfile, false, tr