VBA Auto-run

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can anyone tell me how I can get some VBA to run when a presentation is
shown or when a slide appears without the user doing anything?

There doesn't seem to be an onOpen or onLoad method for either a slide or a
presentation like there is in other Office products.

Many thanks
 
Paul,

You have to understand the difference between opening a presentation and
viewing it. In the view mode, you will have to build your own event handler
to automate code.


Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
Can anyone tell me how I can get some VBA to run when a presentation is
shown or when a slide appears without the user doing anything?

There doesn't seem to be an onOpen or onLoad method for either a slide or a
presentation like there is in other Office products.

An event handler can detect when a user's moved to a new slide, but as you've
found, you can't get code to run on opening a presentation.

Normally you'd put an event handler in an add-in, but that would require that
it be installed on every pc where you want the show to work.

Another trick that might work is to start the presentation with an introductory
starting slide. On it, you have a "Start the show" button the user can click.
This triggers a macro that loads the event handler and moves to the next slide.

That'll get you around having to install an add-in, but it won't work unless
the user's macro security settings permit macros to run, something you can't be
sure of usually. Also, macros don't work in the free Viewer.

More on event handlers:

Make PPT respond to events
http://www.pptfaq.com/FAQ00004.htm
 
Thanks for the response.

I appreciate there is a difference and, in fact, I'd like to be able to
automate both modes (edit and view) in the future.

At the moment, though, it's view mode I'm interested in.
 
Many thanks - this looks like what I'm looking for, although it's a shame you
have to do this stuff via an add-in. Oh well, maybe in PPT 3001......

Paul
 
Many thanks - this looks like what I'm looking for, although it's a shame you
have to do this stuff via an add-in. Oh well, maybe in PPT 3001......

Nah. It'll just be harder than ever to get even an add-in to run any code.

Always the optimist,
 
Steve Rindsberg said:
Nah. It'll just be harder than ever to get even an add-in to run any code.

Always the optimist,

To the optimist, the glass is half full
To the pessimist, the glass is half empty
To the engineer the glass is twice as big as it needs to be
Me? I think it's time to get another round of drinks!
 
To the optimist, the glass is half full
To the pessimist, the glass is half empty
To the engineer the glass is twice as big as it needs to be
Me? I think it's time to get another round of drinks!

And to the pessimist, all surprises are pleasant ones.
Especially when some guy shows up with another glass. Full or not. <g>
 
Back
Top