Hi Ishan,
Thank you for contacting Syncfusion support.
We can change the slide order in a PowerPoint Presentation with the below code snippet. In this code snippet, we have swapped the positions of slide 3 and 2.
|
//Open an existing Presentation
IPresentation presentation = Presentation.Open("Sample.pptx");
//Clone the slide to which we need to change the position. Here we have cloned the slide at index position 2
ISlide slide = presentation.Slides[2].Clone();
//Insert the cloned slide in the required index position
presentation.Slides.Insert(1, slide);
//Remove the existing slide which we have inserted in another position. Now its position in the presentation will be incremented, because we have inserted the same slide in a previous position
presentation.Slides.RemoveAt(3);
//Save the Presentation in file system
presentation.Save("Output.pptx"); |
Please find the complete sample in below link,
Please let us know if you need any further assistances in this.
Thanks,
Meikandan