Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Fri Mar 19, 2021 5:45 am

How do i add new slide after the specified number of page?

I'm use my ppt template, and want to add new slide only after slide[2], what should i do?

qingx123
 
Posts: 3
Joined: Wed Mar 17, 2021 7:56 am

Fri Mar 19, 2021 6:57 am

Hello,

Thanks for your inquiry.
Please refer to the following code. Feel free to contact us if you have further questions.
Code: Select all
            Presentation presentation = new Presentation();
            presentation.LoadFromFile("test.pptx");
            presentation.Slides.Insert(3);
            presentation.SaveToFile("result.pptx",FileFormat.Pptx2013);


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Mar 26, 2021 7:27 am

Hello,

Greetings from E-iceblue!
Did the code we provided work for you? Any feedback will be greatly appreciated.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Apr 07, 2021 1:22 am

yes thank you very much! :lol:

qingx123
 
Posts: 3
Joined: Wed Mar 17, 2021 7:56 am

Wed Apr 07, 2021 9:59 am

You are welcome.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.Presentation