Code Control of Powerpoint Show - Starting from a particular slide

C

Chris Clark

Hi,

I have a section of Delphi code that starts a powerpoint presentation. The
actual code works fine however when you want to start the slide show from a
slide in the middle of the show it still shows slide 1 (including any
transitions) first and then goes to the slide that you request to start.
This looks very messy.

I am using PPT 2002 - PPT does have the button on the slides window that
allows you to start from a particular slide but I am wondering if anyone
knows if the command to do this is exposed through OLE at all and what it
is. I have gone through the SlideShowSettings object and also the
SlideShowWindow object but have been unable to find anything that seems to
work.

I have tried SlideShowSettings.StartingSlide := StartingSlide; prior to the
but this just seems to throw an exception as no presentation appears at all
and other attempts seems to require the SlideShowSettings.Run; command to be
called first to actually start the show before being able to change slides.

Has anyone tried doing this before and is able to help here.

Many thanks,
Chris

//-------------------
// code snippet

PowerPoint.ActivePresentation.SlideShowSettings.ShowType :=
ppShowTypeSpeaker;
with PowerPoint.ActivePresentation do
begin
// Move to starting slide and refresh any custom animations.
SlideShowSettings.Run;

GotoSlide(StartingSlide, True);

BringShowToFront;
end;

//-----------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top