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

Free Support Forum - aspose.com

Speaker notes disappear when cloning slide

When I clone a slide in PPT and sve it to a new PPT, the speaker notes disappear. It there something that I am doing wrong?

Hello James,

When the slides are cloned, the slide notes are not copied in the cloned slides. One need to explicitly copy the slide notes in to cloned slide. Please use the following code snippet and I feel it will serve your purpose of copying slide notes along with slide cloning.

Presentation pSource = new Presentation("source.ppt");

//Instantiate a Presentation where the cloned slide will be added

Presentation pDest = new Presentation();

SortedList sList = new SortedList();

for (int sCtr = 1; sCtr <= pSource.Slides.LastSlidePosition; sCtr++)

{

Slide sSlide = pSource.GetSlideByPosition(sCtr);

Slide dstSlide = pSource.CloneSlide(sSlide, pDest.Slides.LastSlidePosition + 1, pDest, sList );

//add notes

dstSlide.AddNotes();

dstSlide.Notes.Paragraphs.Clear();

if (sSlide.Notes != null)

{

foreach (Paragraph srcP in sSlide.Notes.Paragraphs)

{

Paragraph dstP = new Paragraph(srcP);

dstSlide.Notes.Paragraphs.Add(dstP);

}

}

}

Thanks and Regards,