PDA

View Full Version : vba powerpoint animation



balumail75
03-05-2010, 09:29 AM
Hi,

I am looking for vba code to pick animation of a shape, and apply it for another shape. Please help.

and also copy all the animations from one presentation to the other presentation, slide to slide.

Thanks,
Balu.

John Wilson
03-09-2010, 12:03 PM
First - this is a complex subject! This code is only an outline and you will need to modify if the animation is at all complex. it should get you started though.

Dim oeff As Effect
Dim osld As Slide
Sub pickit()
Set osld = ActiveWindow.View.Slide
Set oeff = osld.TimeLine.MainSequence.FindFirstAnimationFor(ActiveWindow.Selection.Sha peRange(1))
End Sub
Sub placeit()
Dim oeff2 As Effect
Set osld = ActiveWindow.View.Slide
Set oeff2 = osld.TimeLine.MainSequence.AddEffect(ActiveWindow.Selection.ShapeRange(1), oeff.EffectType)
End Sub

balumail75
03-10-2010, 04:39 AM
Thanks John.

Is there any way to store the animations for each slide into an display box? and select them onebyone for other new presentations.

John Wilson
03-11-2010, 07:46 AM
There are several commercial products that do this

Animation Carbon is one.

I wouldn't even consider writing my own.