Table of contents
Collapse the table of content
Expand the table of content

Timing.Restart Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Represents whether the animation effect restarts after the effect has started once. Read/write.


expression. Restart

expression A variable that represents a Timing object.

Return Value



The value of the Restart property can be one of these MsoAnimEffectRestart constants. The default is msoAnimEffectRestartNever.

|| |:-----| |msoAnimEffectRestartAlways| |msoAnimEffectRestartNever| |msoAnimEffectRestartWhenOff|


The following example adds a shape and an animation to it, then sets the animation's restart behavior.

Sub AddShapeSetTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    'Adds shape and sets animation

    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)

    With effDiamond.Timing
        .Duration = 3
        .RepeatDuration = 5
        .RepeatCount = 3
        .Restart = msoAnimEffectRestartAlways
    End With

End Sub

See also


Timing Object

© 2018 Microsoft