Sequences 集合

         
TimeLine
Sequences
Sequence

代表 Sequence 对象的集合。使用 Sequence 对象添加、查找、修改和复制动画效果。

使用 Sequences 集合

使用 TimeLine 对象的 InteractiveSequences 属性返回 Sequences 集合。使用 Add 方法添加交互式动画序列。以下示例向当前演示文稿的第一张幻灯片中添加两个形状并设置星形形状的交互式效果,这样在单击棱台形状时该星形形状会具有动画效果。

Sub AddNewSequence()
    Dim shp1 As Shape
    Dim shp2 As Shape
    Dim interEffect As Effect

    Set shp1 = ActivePresentation.Slides(1).Shapes.AddShape _
        (Type:=msoShape32pointStar, Left:=100, _
        Top:=100, Width:=200, Height:=200)
    Set shp2 = ActivePresentation.Slides(1).Shapes.AddShape _
        (Type:=msoShapeBevel, Left:=400, _
        Top:=200, Width:=150, Height:=100)

    With ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add(1)
        Set interEffect = .AddEffect(shp2, msoAnimEffectBlinds, _
            trigger:=msoAnimTriggerOnShapeClick)
        interEffect.Shape = shp1
    End With
End Sub