Converting each slide of powerpoint presentation to image is very simple, you just need to add references of Microsoft.Office.Interop.PowerPoint and Microsoft.Office.Core in your application.
The full code of converting each slide of Powerpoint Presentation to Image in C# is shown below
static void Main(string args)
Application pptApplication = new Application();
pptApplication.Visible = MsoTriState.msoTrue;
Presentation ppt = pptApplication.Presentations.Open(@"Your_PowerPointFileLocation", MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
var count = 0;
foreach(Slide slide in ppt.Slides)
slide.Export(@"Your_Image_Location\slide" + count + ".png", "png", 320, 240);
In our code at first we have created an object of Application Class (interface Microsoft.Office.Interop.PowerPoint.Application). Then using the application object we have open our presentations using function pptApplication.Presentations.Open(). Now we have Presentation object, from which we can extract each slides and export it to the image using function slide.Export().
Lets say you have a powerpoint presentation of 3 slides like below.
The above code will give you 3 images (slide0, slide1 and slide2) like below.
Please Like and Share CodingDefined.com Blog, if you find it interesting and helpful.