一、需要安装的文件
jacob.dll和jacob-1.18.zip。
jacob压缩包直接解压在项目中引用,dll文件放置于windows/system32位置中
二、调用方式,以金山举例
//启动office PowerPoint 程序
ActiveXComponent pptApp = null;
Dispatch presentations = null;
Dispatch outputPresentation = null;
Dispatch outputSlides = null;
try{
ComThread.InitSTA();
pptApp = new ActiveXComponent("KWPP.Application");
presentations = pptApp.getProperty("Presentations").toDispatch();
File file = new File(outputPPTPath);
if(file.exists()){
file.delete();
}
file.createNewFile(