Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / November 2006

Tip: Looking for answers? Try searching our database.

Cloning animations in Visual Basic for PPT 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jkl - 11 Nov 2006 05:43 GMT
I need to clone an animation from one shape to another in PowerPoint 2003. I
don't have $50 for "Animation Carbon". The clone method of the sequence
object should do this.

However, when I use this method, it does not clone the text animation
information. Here is a snippet of my code (prior to running the macro, the
user selects the shape whose animation he wants to clone and the shape he
wants to animate):

   'Get the slide with the shapes
   Set mySlide = ActiveWindow.Selection.SlideRange(1)
   'Get the shape that has the animation to be copied
   Set myShapeFrom = ActiveWindow.Selection.ShapeRange(1)
   'Get the shape to be animated
   Set myShapeTo = ActiveWindow.Selection.ShapeRange(2)
   
   'Check each effect in the main sequence of the slide where the shapes were
   'selected
   For Each myEffFrom In mySlide.TimeLine.MainSequence
       'Check if the shape attached to this effect is the shape whose
       'animation is to be copied
       If myEffFrom.Shape.Id = myShapeFrom.Id Then
           'If it is, clone the effect and set the shape for this effect
           'to the shape being animated
           Set myEffTo = mySlide.TimeLine.MainSequence.Clone(myEffFrom)
           Set myEffTo.Shape = myShapeTo
       End If
   Next myEffFrom

   (same code for each interactive sequence)

If the shape being animated (i.e., myShapeTo) has text, only the text is
animated. When I look at the effect options (pulldown from effect in the
custom animation pane in ppt) there is no text animation tab.

I checked the parameters for each effect (original and cloned) and the only
one that doesn't match is the EffectInformation.AnimateBackground property.
This is true for the original effect and false for the cloned effect.  The
AnimateBackground property is read only for the EffectInformation object.

So........ what am I overlooking? I'd truly appreaciate any help anyone can
give me.

Thanks,
Shyam Pillai - 11 Nov 2006 16:24 GMT
Hi,
The approach you have taken is the easy way to clone a animation which will
work in many cases but will also fail in many cases too as you have
experienced. Take a look at the ConvertToAnimateBackground.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm

>I need to clone an animation from one shape to another in PowerPoint 2003.
>I
[quoted text clipped - 45 lines]
>
> Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.