C# 打开PPT文件另存为PPTX

        /// <summary>
        /// rename PPT
        /// </summary>
        private static void renamePPT()
        {
            //add references Microsoft.Office.Interop.PowerPoint
            //using PowerPoint = Microsoft.Office.Interop.PowerPoint;
            string pptPath = @"R:\LiChao\Temp\test\CCB_F4I;09_Field Work - Part 1 Field Work.ppt";
            var app = new PowerPoint.Application();
            //add references System.Core
            //using Microsoft.Office.Core;
            app.Presentations.Open2007(pptPath, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoFalse);
            app.ActivePresentation.SaveAs(@"R:\LiChao\Temp\test\CCB_F4I;09_Field Work - Part 1 Field Work.pptx", PpSaveAsFileType.ppSaveAsDefault, MsoTriState.msoFalse);
            app.ActivePresentation.Close();
        }


posted @ 2013-08-14 19:04  pangbangb  阅读(955)  评论(0编辑  收藏  举报