How Apply Entry & Exit Effect on Shape ?

G

Guest

Hi
I am doing simulationin Powerpoint.I want to add Entry & Exit Effect to the
Shape.I have one shape e.g Rectangle coming from right this is an Entry
Effect but i don't know how to apply Exit Effect to same shape one after the
other...
What i want is that i want to apply the Entry Effect to the shape e.g coming
from right then i want to apply Exit Effect immediately after the Entry
Effect..
Presently i am doing Coding In Visual Basic . Can any one help me out in
this matter that how to give Entry & Exit Effect ....

Thanks
Amrish
 
S

Shyam Pillai

Snippet assigns entrance as well as exit animation (fly) to the same shape.

Sub Example()
Dim oShp As PowerPoint.Shape
Dim oSld As PowerPoint.Slide
Dim oEffectEntrance As PowerPoint.Effect
Dim oEffectExit As PowerPoint.Effect

Set oSld = ActivePresentation.Slides(1)
Set oShp = oSld.Shapes.AddShape(msoShapeRectangle, 100, 100, 100, 100)
Set oEffectEntrance = oSld.TimeLine.MainSequence.AddEffect(oShp, _
msoAnimEffectFly,
, msoAnimTriggerOnPageClick)
With oEffectEntrance
.EffectParameters.Direction = msoAnimDirectionRight
End With

Set oEffectExit = oSld.TimeLine.MainSequence.AddEffect(oShp, _
msoAnimEffectFly,
, msoAnimTriggerAfterPrevious)
With oEffectExit
.EffectParameters.Direction = msoAnimDirectionRight
.Exit = True 'Make the
effect an exit animation
.Timing.TriggerDelayTime = 1 ' Make it happen with a
delay of 1 second
End With
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