C# 利用Microsoft.Office.Interop.PowerPoint打开PPT文件另存为PPTX
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
代码如下: 1. /// <summary> 2. /// rename PPT 3. /// </summary> 4. private static void renamePPT() 5. { 6. //add references Microsoft.Office.Interop.PowerPoint 7. //using PowerPoint = Microsoft.Office.Interop.PowerPoint; 8. string pptPath = @"R:\LiChao\Temp\test\CCB_F4I;09_Field Work - Part 1 Field Work.ppt"; 9. var app = new PowerPoint.Application(); 10. //add references System.Core 11. //using Microsoft.Office.Core; 12. app.Presentations.Open2007(pptPath, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoFalse); 13. app.ActivePresentation.SaveAs(@"R:\LiChao\Temp\test\CCB_F4I;09_Field Work - Part 1 Field Work.pptx", PpSaveAsFileType.ppSaveAsDefault, MsoTriState.msoFalse); 14. app.ActivePresentation.Close(); 15. } 该文章在 2023/12/30 1:07:22 编辑过 |
关键字查询
相关文章
正在查询... |