Sequences コレクション
Microsoft PowerPoint Visual Basic リファレンス |
Sequences コレクション
TimeLine Sequences Sequence |
Sequence オブジェクトのコレクションを表します。アニメーション効果を追加、検索、変更、またはコピーを作成するには、Sequence オブジェクトを使用します。
使い方
Sequences コレクションを取得するには、TimeLine オブジェクトの InteractiveSequences プロパティを使用します。対話型のアニメーション シーケンスを追加するには、Add メソッドを使用します。次の使用例は、現在のプレゼンテーションのスライド 1 に 2 つの図形を追加し、星の図形に対話型効果を設定して、斜めの図形をクリックしたときにアニメーションを実行するようにします。
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