Timing.AutoReverse property (PowerPoint)

Determines whether an effect should play forward and then in reverse, thereby doubling its duration. Read/write.

Syntax

expression. AutoReverse

expression A variable that represents an Timing object.

Return value

MsoTriState

Remarks

The value of the AutoReverse property can be one of these MsoTriState constants.

Constant Description
msoFalse The default. The effect does not play forward and then in reverse.
msoTrue The effect plays forward and then in reverse.

Example

The following example adds a shape and an animation effect to it; then it sets the animation to reverse direction after it finishes its forward movement.

Sub SetEffectTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    'Adds rectangle and applies diamond effect
    Set shpRectangle = ActivePresentation.Slides(1).Shapes.AddShape _
        (Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine _
        .MainSequence.AddEffect(Shape:=shpRectangle, _
         effectId:=msoAnimEffectPathDiamond)

    'Sets the duration of and reverses the effect
    With effDiamond.Timing
        .Duration = 5 ' Length of effect.
        .AutoReverse = msoTrue
    End With

End Sub

See also

Timing 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.