Free Support Forum -

Creating slides by calling functions


I am trying to write a C# program that creates a presentation (with 30 slides), where each slide is created by a function that returns a slide. This is my sample code:

Presentation MyPres = New Presentation();

Slide[] MyPresSlideDeck = new Slide[30];


MyPresSlideDeck[i] = MakeSlide(.....);



Systems.Collections.SortedList slist = new Systems.Collections.SortedList();

MyPres[i].CloneSlide(MyPresSlideDeck[i], MyPres.Slides.LastSlidePosition+1, MyPres, slist);


MyPres.Write("Output path for file");


protected slide MakeSlide(){.......}

Am I on the right track, or am I writing something wrong?Thanks!!

Answered here