Restart Property

Restart Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

MsoAnimEffectRestart

MsoAnimEffectRestart can be one of these MsoAnimEffectRestart constants.
msoAnimEffectRestartAlways
msoAnimEffectRestartNever Default.
msoAnimEffectRestartWhenOff

expression.Restart

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

Example

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