We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CloneSlide method not working as expected

I would expect this code to make a copy of the first slide and insert it at position 10 based upon the documentattion. The slide deck has over 20 slides and the following code copies the first slide to the end of the deck. Should I be using another method to copy the first slide to a position somewhere in the middle of a deck?

Thank you for your assistance.

Presentation.CloneSlide Method (Slide, Int32)
Makes a copy of a slide.

Parameters
srcSlide Source slide.
position Position of a new slide.

var fis = new System.IO.FileStream(MapPath("~/Application") + "\\Temp.ppt", System.IO.FileMode.Open, System.IO.FileAccess.Read);
var pres = new Presentation(fis);
var slides = pres.Slides;
fis.Close();

pres.CloneSlide(slides[0], 10);

Hello Dear,

I have investigate and used the same code snippet shared by you with the presentation I have and have successfully been able to clone the slide at right index using Aspose.Slides for .NEt 4.3.0. Can you please investigate the issue on your end please once again using mentioned product version. If the problem still persists then please share the presentation file with us for further investigation.

We are sorry for your inconvenience,