Hi, what would the code be for a macro to change the animation of a selected item to flying in and change the speed to 1 second.
Thanks!
Hi, what would the code be for a macro to change the animation of a selected item to flying in and change the speed to 1 second.
Thanks!
This assumes that the selected shape is already animated and it's the first animation you want to change:
To ADD the effect to an unanimated shape change the 'set oeff' line toSub change_to_fly() Dim oshp As Shape Dim osld As Slide Dim oeff As Effect On Error Resume Next Set oshp = ActiveWindow.Selection.ShapeRange(1) If Not oshp Is Nothing Then Set osld = oshp.Parent Set oeff = osld.TimeLine.MainSequence.FindFirstAnimationFor(oshp) With oeff .EffectType = msoAnimEffectFly .EffectParameters.Direction = msoAnimDirectionLeft .Timing.Duration = 0.25 End With End If End Sub
Set oeff = osld.TimeLine.MainSequence.AddEffect(oshp, msoAnimEffectFly, , msoAnimTriggerOnPageClick)
Last edited by John Wilson; 07-02-2019 at 06:53 AM.
John Wilson
Microsoft PowerPoint MVP
Amazing Free PowerPoint Tutorials
http://www.pptalchemy.co.uk/powerpoi...tutorials.html