Learn how to split PowerPoint presentation using C#: https://blog.aspose.com/2021/09/03/split-powerpoint-presentations-using-csharp/
Last active
September 5, 2021 16:37
-
-
Save aspose-com-gists/e100eb12855796c52c407ac2fa23eb10 to your computer and use it in GitHub Desktop.
Split PowerPoint Presentations using C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
newPres.Slides[0].Remove(); | |
// Add slide to presentation | |
newPres.Slides.AddClone(slide); | |
// Save presentation | |
newPres.Save(string.Format("Slide_{0}.pptx", slide.SlideNumber), SaveFormat.Pptx); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also use Free online PowerPoint Splitter app