关于Jacob生成PDF的有关问题,遇到有有关问题的office文件,生成出现有关问题,

关于Jacob生成PDF的问题,遇到有问题的office文件,生成出现问题,在线等急急急!
           在用jacob生成PDF文件时,有些有问题的word或者excel文件,在打开的时候就弹出框,进程一直卡在那,让人点确定才能进行下一步,导致出现问题文件的时候需要到服务器里面去查看,进程卡在那里

public static boolean createPdf(String filePath,
String outFile) {
String officekind = filePath.substring(filePath.lastIndexOf("."));
File docFile = new File(filePath);
File pdfFile = new File(outFile);
ActiveXComponent wps = null;
String kind="";
String dockind="";
//word的获取wps的Documents对象,excel获取wps的Workbooks对象
if(officekind.lastIndexOf("xls") > 0||officekind.lastIndexOf("xlsx") > 0||officekind.lastIndexOf("et") > 0){
dockind = "et";
kind="Workbooks";
}else if(officekind.lastIndexOf("doc") > 0||officekind.lastIndexOf("docx") > 0||officekind.lastIndexOf("wps") > 0){
dockind = "wps";
kind="Documents";
}else if(officekind.lastIndexOf("ppt") > 0||officekind.lastIndexOf("pptx") > 0){
dockind = "wpp";
kind="Presentations";
}
try {
  wps = new ActiveXComponent(dockind+".application");
  ActiveXComponent doc = wps.invokeGetComponent(kind).invokeGetComponent("Open", new Variant(docFile.getAbsolutePath()),new Variant(true));
 // JavaWindowsCommandUtil.killTask("et");
  //转换为pdf
  doc.invoke("ExportPdf", new Variant(pdfFile.getAbsolutePath()));
//   doc.invoke("Close");
  doc.invoke("Close", new Variant(false));
              doc.safeRelease();
} catch (Exception e) {
e.printStackTrace();
return false;
}finally {
            if (wps != null) {
             wps.invoke("Quit", new Variant[]{});
                wps.safeRelease();
            }
        }
return true;
}

        但是我打开问题文件的时候会弹出框,如下:
        关于Jacob生成PDF的有关问题,遇到有有关问题的office文件,生成出现有关问题,
        不单单是这种,还有比如乱码文件需要确认编码格式等等。在生成PDF的时候就卡在那里,相信各种在用的过程当中肯定也会遇到这样的文件,不知道大家是怎么解决的!在线等!!!!!!!!
------解决思路----------------------
ActiveXComponent wrdCom = new ActiveXComponent("Word.Application");
wrdCom.setProperty("Visible", new Variant(false));
wrdCom.setProperty("DisplayAlerts", new Variant(false));
不知道有用没