Using ppActionRunMacro on ppMouseOver

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

Guest

The Microsoft documentation shows on many occasion code similar to this one:

With ActivePresentation.Slides(1) _
.Shapes(3).ActionSettings(ppMouseOver)
.Action = ppActionRunMacro
.Run = "CalculateTotal"
.AnimateAction = True
End With
(See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbapp10/html/ppprorun.asp)

But what type of shape will support this? I can't find any shape on
Office2003 that will accept to trigger a macro on a mouseover action.

Thanks
 
What exactly is not working for you? It works for me. Try what I tried
and tell me if it doesn't work and how it is not working.

Based on this code, I created two shapes on slide 1 (just plain
rectangles, but just about anything will work). The first shape is shape
3 on the slide (becasuse the slide already has a title and a subtitle).
The second shape is set to run the macro Bar, which is based on the code
you posted. If I start the Slide Show and click on the shape tied to Bar,
it sets the Mouse Over action settings for the other shape to run Foo.
That way, when I move the mouse over that shape, it pops up a message box
that says "Hello." Here is the code:

Sub Foo()
MsgBox "Hello"
End Sub

Sub Bar()
With ActivePresentation.Slides(1) _
.Shapes(3).ActionSettings(ppMouseOver)
.Action = ppActionRunMacro
.Run = "Foo"
.AnimateAction = True
End With
End Sub


--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top