Show a PowerPoint Presentation using automation more that one time

M

MariaAlex

Hi,
I need to show for a period of time the same ppt on a display. I am able to
do so though my problem is that when i reach the last slice, i need to clic
the arrow to move again to the first slice.

How can I show the presentation for a period of time without someone having
to move from the last to the first slice. That is, How can i show the same
presentation again and again without having a person to do it???

That is the code:




PowerPoint.Application objApp;
PowerPoint.Presentations objPresSet;
PowerPoint._Presentation objPres;
PowerPoint.SlideShowWindows objSSWs;
PowerPoint.SlideShowSettings objSSS;


objApp = new PowerPoint.Application();

objPresSet = objApp.Presentations;
objPres = objPresSet.Open(filename.ppt,
MsoTriState.msoTrue, MsoTriState.msoTrue,
MsoTriState.msoFalse);



//Run the Slide show from slides 1 thru 3.

objSSS = objPres.SlideShowSettings;

bool continues = true;
int counter = 1;
while (continues)
{
objSSS.Run();
objSSWs = objApp.SlideShowWindows;
while (objSSWs.Count >= 1) System.Threading.Thread.Sleep(100);
if (counter == 2) continues = false;
counter++;
}

Thank you very much in advance.
 
L

Lucy Thomson

Hi MariaAlex

Go to slide show -> set up show -> tick 'loop continuously until esc'.

Lucy
 
M

MariaAlex

That works if the presentation is going to be initialize by a user. In this
case, the presentation will be Run from a Windows Form.

What I did to resolve this problem was:

PowerPoint.SlideShowSettings objSSS;
objSSS.LoopUntilStopped = MsoTriState.msoTrue;

Thank you
 

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

Similar Threads


Top