首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在浏览器中以.ppt形式运行PPT

在浏览器中以.ppt形式运行PPT
EN

Stack Overflow用户
提问于 2011-03-16 18:10:48
回答 2查看 2.3K关注 0票数 0

我在网上的某个地方看到过一个powerpoint演示文稿(ppt),它是一个.ppt文件,可以在web浏览器中运行。所以不需要导出到html,swf等,当它涉及到图像时,它是相当好的质量。

你知道该怎么做吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-03-16 18:15:33

对于单个演示文稿,您可以使用Google Docs的演示文稿“嵌入”功能(将ppt上传到Google Docs,然后单击Share...publish / embed)。

对于同样基于此的系统解决方案,我建议看一下Google Docs' API

票数 0
EN

Stack Overflow用户

发布于 2011-03-16 18:20:06

试试这段代码

代码语言:javascript
复制
string ExportLocation = "C:\\Sample";
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
ppApp.Visible = MsoTriState.msoTrue;
ppApp.WindowState = PpWindowState.ppWindowMinimized;
Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;
Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open("C:\\ScreenShots.ppt",
            MsoTriState.msoFalse, MsoTriState.msoFalse,
            MsoTriState.msoFalse);
ppApp.ShowWindowsInTaskbar = MsoTriState.msoFalse;  //Hiding the application; But it will be displayed always
try
{
    Slides objSlides = oPres.Slides;    //Getting all the slides
    for (int i = 1; i < objSlides.Count - 1; i++)
    {
        string file = Path.Combine(ExportLocation, string.Format("{0}.{1}", objSlides[i].Name, "jpg"));
        oPres.Slides[i].Export(file, "jpg", 800, 600);
    }
}
finally
{
    ppApp.Quit();   //Closing the Powerpoint application. Sometimes it won't work too.
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5323744

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档