我正在寻找一种将 PowerPoint 文件的每张幻灯片导出为 html 文件的方法。
我尝试了很多方法:
using Powerpoint = Microsoft.Office.Interop.PowerPoint;
PowerPoint.Application app = new Powerpoint.Application();
PowerPoint.Presentation pres = app.presentation.Open(filepath+"filename.ppt", MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoTrue);
//Trying to export presentation as Html
pres.SaveAs(filepath+"filename.html", PowerPoint.PpSaveAsHtml, MsoTriState.msoTrue);
//Trying to export each Slide as image. Unfortunately don't export as html
int i = 0;
foreach (PowerPoint.Slide slide in press.Slide){
i+=1;
String oPath = filepath+"filename_"+i+".jpg";
slide.Export(oPath, "jpg", 1024, 768);
}
pres.Close();
App.Quit();
我可以以编程方式将每张幻灯片导出为保留动画的简单 html 文件吗?