Appear and disappear a shape

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top