Starting VBA Macros when a slide show is started

G

Guest

I have written some VBA macros that cause visible actions when the user
clicks on specific elements on the slide - a simulation of sorts. What I
need is a method to initialize elements of the VB code - instantiate classes,
assign variables, etc.- when the user opens the slide show, either by
clicking on the slide show button or when auto-opening as a .pps file.

The method is not obvious. I have read "Using Events with the Application
Object" and similar information in the help file, but it seems all of this
requires some prior initialization, which is, of course, what I am looking
for.

Can someone point to or give me an example of how this is done?
Thanks... L. Wert
 
A

Austin Myers

You can't do it with a Macro. Instead you need to save it as a PPA (add in)
and load it on the machine.

Austin Myers
MS PowerPoint MVP Team

PowerPoint Video and PowerPoint Sound Solutions www.pfcmedia.com
 
D

David M. Marcovitz

The alternative to this, which might not be acceptable, but will not
require end users to load an add-in, is to have a button on the first
slide that does all of your initialization and takes you to the next
slide. This is nearly guaranteed to work if you put the presentation in
kiosk mode, forcing the user to click on the button.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
A

Austin Myers

David,

You are right of course, but I hate using the Kiosk mode. (Thie timer
issue.) Instead I would simply uncheck "Advance on click" and "Advance
automatically" for that specific slide.


Austin Myers
MS PowerPoint MVP Team

PowerPoint Video and PowerPoint Sound Solutions www.pfcmedia.com
 
G

Guest

Thanks for your help. I will probably create an entry slide with a button
and disable the "Advance..." characteristics.

Interesting though, that Microsoft didn't include some events like "OnOpen"
to deal with this situation.
 
S

Shyam Pillai

Be sure to read up on Macro Security to inform users that they need to
enable the macros when the presentation is opened for the code to work.
 
S

Shyam Pillai

Be sure to read up on Macro Security to inform users that they need to
enable the macros when the presentation is opened for the code to work.
 
H

Hans Werner Hofmann

Thanks for your help. I will probably create an entry slide with a button
and disable the "Advance..." characteristics.

Interesting though, that Microsoft didn't include some events like "OnOpen"
to deal with this situation.

Hm, there is an undocumented event-procedure set e.g.

OnSlideShowPageChange( sl as SlideshowWindow )

You have to put a (dummy) Controlbutton on first slide to initialize
vba starting the presentation. And you have to create a lot of
if-statements to handle the event within the appropriate slideshow,
because the event is fired to all SlideShowPageChanges in ppt
instance....


Gruß HW
 

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