- using Microsoft.Office.Interop.PowerPoint;
- using Microsoft.Office.Core;
- using System.IO;
- try
- {
- FileInfo objfile = new FileInfo(FileUpload1.PostedFile.FileName);
- if (objfile.Extension.Equals(".ppt"))
- {
- ApplicationClass pptApplication = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
- Presentation pptPresentation = pptApplication.Presentations.Open(objfile.FullName, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
- pptPresentation.Export(objfile.FullName, "jpg", Int32.Parse(pptPresentation.SlideMaster.Width.ToString()), Int32.Parse(pptPresentation.SlideMaster.Height.ToString()));
- }
- else
- {
- Response.Write("Please choose PowerPoint files only");
- }
- }
- catch (Exception ex)
- { }
Convert Powerpoint file into Image file
Hi guys, we can convert all slides of the PowerPoint file into seperate image format, we need to include Microsoft.Office.Interop.PowerPoint as name space

Join the conversation! Your thoughts help the community grow.