I use NetOffice.PowerPointApi to play some Powerpoint-Slides of an existing PPTX. This is how this is done:
PowerPoint.Application powerApplication = new PowerPoint.Application();
PowerPoint.Presentation presentation = powerApplication.Presentations.Open("C:\\dev\\test.pptx", MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoTrue);
// presentation.SlideShowSettings.StartingSlide = 2;
presentation.SlideShowSettings.Run();
while (powerApplication.ActivePresentation.SlideShowWindow.View.CurrentShowPosition < 4)
{
System.Threading.Thread.Sleep(2000);
powerApplication.ActivePresentation.SlideShowWindow.View.Next();
}
Now my plan was to display slide 3 to 4.
But when I set the startingSlide (commented out in my example) I receive an error on powerApplication.ActivePresentation.SlideShowWindow.View.CurrentShowPosition
:
{"SlideShowView.CurrentShowPosition : Invalid request. There is currently no slide show view for this presentation."}
This only happens when I set the property StartingSlide
. If I don't, the presentation runs from the first until the 4th slide.