Share via


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

Concepts

Timing Object Members

Timing Object