C# 利用Microsoft.Office.Interop.PowerPoint打開PPT文件另存為PPTX
當前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
代碼如下: 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 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |