ActionSetting.Run Property
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.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Property Run As String
Get
Set
'Usage
Dim instance As ActionSetting
Dim value As String
value = instance.Run
instance.Run = value
string Run { get; set; }
Property Value
Type: System.String
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.
Examples
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