全部显示

AutoReverse 属性

       

设置或返回 MsoTriState 类型常数,该值代表效果是否应正向播放后再反向播放,并因此而将持续时间加倍。可读写。

expression.AutoReverse

expression  必选。该表达式返回“应用于”列表中的对象之一。

示例

以下示例添加一个形状并向其中添加动画效果;然后将动画设置为正向播放结束后反向播放。

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