0

我正在寻找一种将 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 文件吗?

4

1 回答 1

0

最好是使用转换器来做到这一点。SlideGo 是一款免费软件,可以选择将每张幻灯片转换为一个 HTML 文件,并保留所有动画。实际上它甚至比许多商业工具还要好。

于 2013-09-03T10:44:10.690 回答