Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Split PowerPoint Presentations using C#
// Load PowerPoint presentation
using (Presentation pres = new Presentation("presentation.pptx"))
// Loop through slides
foreach(ISlide slide in pres.Slides)
// Create a new empty presentation
using (Presentation newPres = new Presentation())
// Remove default slide
// Add slide to presentation
// Save presentation
newPres.Save(string.Format("Slide_{0}.pptx", slide.SlideNumber), SaveFormat.Pptx);

This comment has been minimized.

Copy link

@stasmiroshnichenko stasmiroshnichenko commented Sep 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment