if (Path.GetExtension(file).Contains("ppt")) { PPT.Application pptApp = new PPT.Application(); pptApp.Visible = MsoTriState.msoTrue; PPT.Presentation pptPr = pptApp.Presentations.Open(file, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse); pptPr.Slides[1].Export(ImagePath + Path.GetFileNameWithoutExtension(file) + ".png", "png"); pptPr.Close(); pptApp.Quit(); Marshal.ReleaseComObject(pptPr); Marshal.ReleaseComObject(pptApp); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)