标签:
//需要引入COM组件:
//项目->添加引用->com->microsoft office object libraty
//项目->添加引用->com->microsoft powerpoint object libraty
//功能:打开PPT某一页
//参数:filePath: PPT路径;pageIndex:指定打开的页码
<span style="font-size:12px;"> private void GotoSlide(string filePath, int pageIndex) { Microsoft.Office.Interop.PowerPoint.Application PPTApplication = new Microsoft.Office.Interop.PowerPoint.Application(); //以非只读方式打开,方便操作结束后保存. Presentation PPTPresentation = PPTApplication.Presentations.Open(filePath, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoFalse); SlideShowSettings slideShow = PPTPresentation.SlideShowSettings; slideShow.Run(); PPTPresentation.SlideShowWindow.View.GotoSlide(pageIndex); }</span>
http://outofmemory.cn/code-snippet/33373/C-operation-PowerPoint-basic-code
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/ilipan/article/details/47172181