Command Property

Microsoft PowerPoint Visual Basic

Command Property

Sets or returns a String that represents the command to be executed for the command effect. Read/write.

expression.Command

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

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), PowerPoint understands the following verbs: play, stop, pause, togglepause, resume and playfrom. Any other command sent to the shape will be ignored.

Example

The following example shows how to set a command effect animation behavior.

    Set bhvEffect = effectNew.Behaviors.Add(msoAnimTypeCommand)
 
    With bhvEffect.CommandEffect
         .Type = msoAnimCommandTypeVerb
         .Command = Play
    End With