Class CommandEffect (PowerPoint VBA)

The class CommandEffect represents a command effect for an animation behavior. You can send events, call functions, and send OLE verbs to embedded objects using this object. To use a CommandEffect class variable it first needs to be instantiated, for example


Dim cet as CommandEffect
Set cet = ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).CommandEffect

bookmark

Sets or returns the bookmark of the specified object.


ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).CommandEffect.bookmark =

Command

Represents the command to be executed for the command effect.

You can send OLE verbs to embedded objects using this property. If the shape is an OLE object, then the ole object will execute the command if it understands the verb. If the shape is a media object (sound/video), Microsoft PowerPoint understands the following verbs: play, stop, pause, togglepause, resume and playfrom. Any other command sent to the shape will be ignored.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).CommandEffect.Command = "Play"

Type

Represents the type of animation. Possible return values are msoAnimCommandTypeCall - Call, msoAnimCommandTypeEvent - Event, msoAnimCommandTypeVerb - Verb.

The value of the Type property can be one of these MsoAnimType constants.


ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).CommandEffect.Type = msoAnimCommandTypeCall