Free Support Forum - aspose.com

Problem with Presentation.CloneSlide

Hi,

Am using Presentation.cloneSlide to copy the slide from one presentation to another but it is not copying the slide notes associated with that slide.

Does the cloneSlide method has the capabilities to clone even the Slide Notes? If not, is there an alternate method to copy the slide notes from slide to slide during the cloning.

Thanks in advance.

Nataraj

Hi Nataraj,

It is not possible to clone notes from a slide. You will have to write some additional code as illustrated by the following example:

// Copy Notes to the new created slide.

if (srcSlide.Notes != null)

{

sl.AddNotes();

for (int j = 0; j < srcSlide.Notes.Paragraphs.Count; j++)

{

sl.Notes.Paragraphs.Add(new Paragraph(srcSlide.Notes.Paragraphs[j]));

}

sl.Notes.Paragraphs.RemoveAt(0);

}