Running PowerPoint Macros

S

snicks

My users do not have addins to support autorun macros w/in PPT, they will not
install addins and they don’t want to click Tools>Macro>Macro>Run. I was
thinking one way to simplify the running of the macro would be to add a
splash image covering the content of the first page, have the client click on
the image, intercept the click and run the required macro. Problems
immediately raise their ugly heads. First unless the file has been saved
with a .pps extension or the user switches to SlideShow mode the click event
does not fire. I tried running the macro in SlideShow mode but my code
breaks,

For Each oSld In ActivePresentation.Slides
…..
oSld.Shapes.Item(I).Select

The error states the window must be in Slide or Notes view to run the second
line.

Finally a question…

Is it possible to programmatically switch from SlideShow mode to Slide mode
when the PPT has been launched using a .pps extension?

Even better is there some way to launch a macro in design mode other than by
clicking Tools>Macro>Macro>Run or adding the macro toolbar and clicking on
the > button?
 
S

Steve Rindsberg

My users do not have addins to support autorun macros w/in PPT, they will not
install addins and they don’t want to click Tools>Macro>Macro>Run.

If they won't install add-ins, why would they run macros?
If their security settings prevent add-ins, they'll prevent your macros as well,
no?
thinking one way to simplify the running of the macro would be to add a
splash image covering the content of the first page, have the client click on
the image, intercept the click and run the required macro.

There's no need to intercept clicks. Draw a rectangle or other object that
fills the first slide, set its action setting to Run Macro.

But that gets you noplace useful that I can see. You can end the slide show but
once back in design mode, how will they fire any further macros?

You could probably have the macro they ran at the beginning create a toolbar
that fires other macros but that may depend on your original presentation still
being open. If they close it, the toolbar may cease to work.

Likewise, the toolbar will stay put until they remove it.
If they start PPT normally (ie, not by clicking on your PPS) the toolbar will be
there but might not DO anything.

Your best bet: tell them if they want the benefit of macros, they have to
install add-ins. End of story.


Problems
 
S

snicks

I've associated the following function with the click event of an image that
fills the first page of the PPT. This method requires two clicks

click on the visible Show Slideshow button
click on the first slide

For this particular client this option is better than navigating
Tools>Macro>Macro>Run but if possible I would like to get rid of the "click
on the visible Show Slide button requirement".

Is there anyway of trapping a mouse click or key click, such as pressing F4,
and associating it with a macro while in design mode (not Slideshow Mode)?

Private Sub Image1_Click()
SlideShowWindows(Index:=1).View.Exit
object_changed
End Sub

Thank you.
 
S

Steve Rindsberg

I've associated the following function with the click event of an image that
fills the first page of the PPT. This method requires two clicks

click on the visible Show Slideshow button
click on the first slide

For this particular client this option is better than navigating
Tools>Macro>Macro>Run but if possible I would like to get rid of the "click
on the visible Show Slide button requirement".

Is there anyway of trapping a mouse click or key click, such as pressing F4,
and associating it with a macro while in design mode (not Slideshow Mode)?

Other than via an addin, no. There might be some wonko way of getting it to work on
occasion, but nothing I'd trust in a user's hands.
 

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