Free Support Forum - aspose.com

How to specify StartingSlide /EndingSlide in aspose.slides?

i wan to skip last slide.how can i specify start/end slide.

i tryied but didn't get success with following code.please help me.

Presentation pres = new Presentation();

pres.SlideShowSettings.LoopUntilStopped = false;

if (pres.SlideShowSettings.LoopUntilStopped == false)

{

pres.SlideShowSettings.StartingSlide = 1;

pres.SlideShowSettings.EndingSlide = 2;

}

pres.SlideShowSettings.ManualAdvance = false;

pres.SlideShowSettings.ShowType = SlideShowType.ShowTypeWindow;

Regards,

Alpesh

Please see my code below. Also see the source and output presentation attached by me.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

C#

Presentation pres = new Presentation("c:\\source.ppt");

short startingSlide = 2;

short endingSlide = 4;

pres.SlideShowSettings.RangeType = SlideShowRangeType.ShowSlideRange;

pres.SlideShowSettings.ManualAdvance = false;

pres.SlideShowSettings.StartingSlide = startingSlide;

pres.SlideShowSettings.EndingSlide = endingSlide;

pres.SlideShowSettings.LoopUntilStopped = true;

for (int i = startingSlide; i <= endingSlide; i++)

{

Slide sld = pres.GetSlideByPosition(i);

sld.SlideShowTransition.AdvanceOnClick = false;

sld.SlideShowTransition.AdvanceOnTime = true;

//Advance after 2 seconds

sld.SlideShowTransition.AdvanceTime = 2;

}

pres.Write("c:\\output.ppt");