I am trying to merge a number of powerpoint presentations together.
Unfortuantely the merged presentation is missing pictures from the second presentation.
The following code is being used to copy the slides from one presentation to another (as you can see even if I manually copy the images across, it still is not working correctly).
Regards
private static void CopySlidesToOutput(Presentation sourcePres, Presentation outputPres)
{
SortedList temp = new SortedList();
for (int i = 0; i < sourcePres.Slides.Count; i++)
{
Slide s = outputPres.CloneSlide(sourcePres.Slides, outputPres.Slides.Count, outputPres, temp);
}
for(int i = 0; i < sourcePres.Pictures.Count; i++)
{
int newPicId = outputPres.Pictures.Add(sourcePres.Pictures);
System.Console.Out.WriteLine(“Copied picture {0} to presentation as {1}”, i, newPicId);
}
System.Console.Out.WriteLine(sourcePres.Title);
}