J
Juan Sarmiento
Regards, I have the next code:
Sub CreateAnimationWithTrigger()
Dim oEffect As Effect
Dim oShpA As Shape
Dim oShpB As Shape
With ActivePresentation.Slides(1)
'Create two autoshapes on the slide.
Set oShpA = .Shapes.AddShape(msoShapeRectangle, 100, 100, 50, 50)
Set oShpB = .Shapes.AddShape(msoShapeRectangle, 200, 100, 50, 50)
' Assign an interactive animation to shape A
Set oEffect1 = .TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=oShpA, effectId:=msoAnimEffectAppear, _
trigger:=msoAnimTriggerOnShapeClick)
Set oEffect2 = .TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=oShpA, effectId:=XXXXXXXXXXXX, _
trigger:=msoAnimTriggerOnShapeClick)
End With
' Define the triggering shape. If you omit this line then the animation will be
' triggered by clicking on the shape A itself.
oEffect1.Timing.TriggerShape = oShpB
oEffect2.Timing.TriggerShape = oShpB
End Sub
Sub CreateAnimationWithTrigger()
Dim oEffect As Effect
Dim oShpA As Shape
Dim oShpB As Shape
With ActivePresentation.Slides(1)
'Create two autoshapes on the slide.
Set oShpA = .Shapes.AddShape(msoShapeRectangle, 100, 100, 50, 50)
Set oShpB = .Shapes.AddShape(msoShapeRectangle, 200, 100, 50, 50)
' Assign an interactive animation to shape A
Set oEffect1 = .TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=oShpA, effectId:=msoAnimEffectAppear, _
trigger:=msoAnimTriggerOnShapeClick)
Set oEffect2 = .TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=oShpA, effectId:=XXXXXXXXXXXX, _
trigger:=msoAnimTriggerOnShapeClick)
End With
' Define the triggering shape. If you omit this line then the animation will be
' triggered by clicking on the shape A itself.
oEffect1.Timing.TriggerShape = oShpB
oEffect2.Timing.TriggerShape = oShpB
End Sub