[VBA] - Running presentation through code

A

AlexT

Folks,

Probably a trivial question...

I have a presentation that runs just fine when started using the
interactive menu (F5).

However when using VBA it gets "stuck" to the first slide...

Here is my code:

PowerPoint.Presentations.Open locFile
With ActivePresentation.SlideShowSettings
.LoopUntilStopped = msoTrue
.ShowType = ppShowTypeKiosk
.Run
End With
What's wrong ?

Additionally, I'd like to hide the windows cursor (which incidentally
does not show up when running the very same presentation
interactively). How world I do that ?

Any info / pointer welcome

Thanks

--alexT
 
S

Shyam Pillai

Alex,
In addition to Steve's comments, you've set the show to run in kiosk mode.
Is this intentional? Kiosk mode prevents the show from progressing via mouse
clicks. You need to provide buttons on the slide to navigate thru the
slideshow.
 
A

AlexT

Steve,

Thanks for your message
1) Is focus on the VBA IDE rather than on the PowerPoint slide/show
window when you run the code? The show won't advance until its
window has focus. Try minimizing the IDE.

Actually my code is runing from a PowerPoint add-in
2) Are your slide advances set to Automatically After x seconds in
addition to (or instead of) On mouse click? If not, the show won't
advance.

Yes, that's the case
In addition to Steve's comments, you've set the show to run in kiosk
mode. Is this intentional? Kiosk mode prevents the show from
progressing via mouse clicks. You need to provide buttons on the slide
to navigate thru the slideshow.

Actually the presentation is supposed to run unattended, looping
endlessly without user interaction...

--alexT
 
A

AlexT

Folks,

Thanks for all the help and ideas

Actually I have managed to pinpoint my problem to the fact that after
opening my presentation I still continue to run VBA.

My goal is to have a file watcher that scans through a folder a
whenever a presentation is added it does close the current presentation
and open that new file.

Everything works as fine except that the new presentation will not
"run" as long as VBA is running.

I have tried to run a DoEvent loop, as well as a calling the Kernel
sleep function.

Evidently PowerPoint doesn't multi thread it's presentations...

So I guess my best bet is to have an external trigger that would raise
an event in PP. No sure it's doable in VBA... Any suggestion ?

Regards

--alexT
 

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