Accelerate Property

Microsoft PowerPoint Visual Basic

Accelerate Property

       

Returns or sets a Single that represents the percent of the duration over which a timing acceleration should take place. For example, a value of 0.9 means that an acceleration should start slower than the default speed for 90% of the total animation time, with the last 10% of the animation at the default speed. Read/write.

expression.Accelerate

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

Remarks

To slow down an animation at the end, use the Decelerate property.

Example

This example adds a shape and adds an animation, starting out slow and matching the default speed after 30% of the animation sequence.

Sub AddShapeSetTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    'Adds rectangle and specifies effect to use for rectangle
    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)

    'Specifies the acceleration for the effect
    With effDiamond.Timing
        .Accelerate = 0.3
    End With

End Sub