全部显示

TriggerType 属性

       

设置或返回 MsoAnimTriggerType 类型常数,该常数代表启动动画的触发器。可读写。

expression.TriggerType

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

示例

以下示例向幻灯片添加一个形状,并对该形状添加动画,然后指示在单击该形状三秒钟后开始动画。

Sub AddShapeSetTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    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 = 5
        .TriggerType = msoAnimTriggerOnShapeClick
        .TriggerDelayTime = 3
    End With

End Sub