Split PowerPoint Document into Individual Slides in C#

When we deal with a large PowerPoint document, we may need to split the document to small presentations, each of which contains one original slide. In this article, you will learn how to split a PowerPoint document into individual slides using .NET Presentation API, the free Spire.Presentation.

The method in this solution is as below:

  • Create a new PowerPoint document, remove the default blank slide.
  • Clone the specified the slide from source presentation to the new one.

Using Code

using Spire.Presentation;


namespace SplitPresentation


    class Program


        static void Main(string[] args)


            //load source PowerPoint file

            Presentation ppt = new Presentation();



            for (int i = 0; i < ppt.Slides.Count; i++)


                //initialize new instance of Presentation class

                Presentation newppt = new Presentation();

                //remove blank slide


                //clone slide from source file to new document


                //save the file

                newppt.SaveToFile(String.Format(“result-{0}.pptx”, i), FileFormat.Pptx2010);






After running the code, the sample file that contains three slides will be split into three presentation files as below.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s