Decelerate Property

Microsoft PowerPoint Visual Basic

expression.Decelerate

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

Example

This example adds a shape and adds an animation that starts at the default speed and slows down after 70% of the animation has finished.

Sub AddShapeSetTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    'Adds rectangle and sets animation 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)

    'Slows the effect after seventy percent of the animation has finished
    With effDiamond.Timing
        .Decelerate = 0.3
    End With

End Sub