ActionSetting.Run property (PowerPoint)

Returns or sets the name of the presentation or macro to be run when the specified shape is clicked or the mouse pointer passes over the shape during a slide show. Read/write.

Syntax

expression.Run

expression A variable that represents an ActionSetting object.

Return value

String

Remarks

For this property to affect the slide show action, you must set the Action property value to ppActionRunMacro or ppActionRunProgram.

If the value of the Action property is ppActionRunMacro, the specified string value should be the name of a global macro that's currently loaded. If the value of the Action property is ppActionRunProgram, the specified string value should be the full path and file name of a program.

You can set the Run property to a macro that takes no arguments or a macro that takes a single Shape or Object argument. The shape that was clicked during the slide show will be passed as this argument.

Example

This example specifies that the CalculateTotal macro be run whenever the mouse pointer passes over the shape during a slide show.

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

See also

ActionSetting Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.