using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using PPT = Microsoft.Office.Interop.PowerPoint; //11.0-2003,12.0-2007
namespace CreatePPTDemo
{
calss Program
{
static void Main(string[] args)
{
string path;
PPT.Application pptApp;
PPT.Presentation pptDoc;
path = @"d:/test.ppt"; //path = @"d:/test.pps";
pptApp = new PPT.ApplicationClass();
if(File.Exists(path))
{
File.Delete(path);
}
Object nothing = Missing.Value;
pptDoc = pptApp.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse);
PPT.PpSaveAsFileType format = PPT.PpSaveAsFileType.ppSaveAsDefault;
//PPT.PpSaveAsFileType.ppSaveAsShow;
pptDoc.SaveAs(path,format,Microsoft.Office.Core.MsoTriState.msoFalse);
pptDoc.Close();
pptApp.Quit();
}
}
}