Get the animation data from shape

R

Robert Pohl

Hello, How can I get the animation data from a shape? (PPT 2003)
I use this code for the entry effect:
/* Check for entry effect */
if(_slide.Shapes[n].AnimationSettings.Animate==Microsoft.Office.Core.MsoTriState.msoTrue)
{
_so.Animation = (int)_slide.Shapes[n].AnimationSettings.EntryEffect;
}

Can I do anything similar with the exit effect (the effect that fades the
object away)

Thanks,
Rob
 
C

Chirag

Look at the TimeLine object of the Slide:
ActivePresentation.Slides(1).TimeLine

It will get you access to all PowerPoint 2003 animations. To get the first
animation for a specific shape, use:
ActivePresentation.Slides(1).TimeLine.MainSequence.FindFirstAnimationFor(Shp)

- Chirag

OfficeOne Animations - Add over 50 animation effects to PowerPoint
http://officeone.mvps.org/anims/anims.html
 
R

Robert Pohl

Thanks, but this sounds like that FindFirstAnimationFor() would get the
"EntryEffect", since that would be first?

Am I thinking strange here? :)

Thanks,
Rob

Chirag said:
Look at the TimeLine object of the Slide:
ActivePresentation.Slides(1).TimeLine

It will get you access to all PowerPoint 2003 animations. To get the first
animation for a specific shape, use:
ActivePresentation.Slides(1).TimeLine.MainSequence.FindFirstAnimationFor(Shp)

- Chirag

OfficeOne Animations - Add over 50 animation effects to PowerPoint
http://officeone.mvps.org/anims/anims.html

Robert Pohl said:
Hello, How can I get the animation data from a shape? (PPT 2003)
I use this code for the entry effect:
/* Check for entry effect */
if(_slide.Shapes[n].AnimationSettings.Animate==Microsoft.Office.Core.MsoTriState.msoTrue)
{
_so.Animation = (int)_slide.Shapes[n].AnimationSettings.EntryEffect;
}

Can I do anything similar with the exit effect (the effect that fades the
object away)

Thanks,
Rob
 
S

Shyam Pillai

Robert,
The code you've used to arrive at the animation information was applicable
to PPT 97/2000. It is hardly reliable in later versions since earlier
versions did not have anything apart from entrance animations. You will need
to enumerate the timeline object to arrive at all the informaiton.
This page: http://skp.mvps.org/ppttimeline1.htm introduces you to the
timeline object.

An entrance effect is the same an an exit effect in terms of information
except that one property (Exit) is set to true.

If you have further questions. Feel free to post back.


--
Regards,
Shyam Pillai

Toolbox: http://skp.mvps.org/toolbox


Robert Pohl said:
Thanks, but this sounds like that FindFirstAnimationFor() would get the
"EntryEffect", since that would be first?

Am I thinking strange here? :)

Thanks,
Rob

Chirag said:
Look at the TimeLine object of the Slide:
ActivePresentation.Slides(1).TimeLine

It will get you access to all PowerPoint 2003 animations. To get the
first
animation for a specific shape, use:
ActivePresentation.Slides(1).TimeLine.MainSequence.FindFirstAnimationFor(Shp)

- Chirag

OfficeOne Animations - Add over 50 animation effects to PowerPoint
http://officeone.mvps.org/anims/anims.html

Robert Pohl said:
Hello, How can I get the animation data from a shape? (PPT 2003)
I use this code for the entry effect:
/* Check for entry effect */
if(_slide.Shapes[n].AnimationSettings.Animate==Microsoft.Office.Core.MsoTriState.msoTrue)
{
_so.Animation = (int)_slide.Shapes[n].AnimationSettings.EntryEffect;
}

Can I do anything similar with the exit effect (the effect that fades
the
object away)

Thanks,
Rob
 
R

Robert Pohl

Shyam,

Thanks, iv'e been digging into the Timeline object now and found out
basically how it works!

One thing that is a bit confusing is what properties I can read from
different effects. What I would like is a guide that explains what properties
that are affected for example in a "msoAnimEffectFade" effect. But I guess
that is for me to "trial and error" :)

Thanks anyway, you replies are very appreciated.

/Rob

Shyam Pillai said:
Robert,
The code you've used to arrive at the animation information was applicable
to PPT 97/2000. It is hardly reliable in later versions since earlier
versions did not have anything apart from entrance animations. You will need
to enumerate the timeline object to arrive at all the informaiton.
This page: http://skp.mvps.org/ppttimeline1.htm introduces you to the
timeline object.

An entrance effect is the same an an exit effect in terms of information
except that one property (Exit) is set to true.

If you have further questions. Feel free to post back.


--
Regards,
Shyam Pillai

Toolbox: http://skp.mvps.org/toolbox


Robert Pohl said:
Thanks, but this sounds like that FindFirstAnimationFor() would get the
"EntryEffect", since that would be first?

Am I thinking strange here? :)

Thanks,
Rob

Chirag said:
Look at the TimeLine object of the Slide:
ActivePresentation.Slides(1).TimeLine

It will get you access to all PowerPoint 2003 animations. To get the
first
animation for a specific shape, use:
ActivePresentation.Slides(1).TimeLine.MainSequence.FindFirstAnimationFor(Shp)

- Chirag

OfficeOne Animations - Add over 50 animation effects to PowerPoint
http://officeone.mvps.org/anims/anims.html

Hello, How can I get the animation data from a shape? (PPT 2003)
I use this code for the entry effect:
/* Check for entry effect */
if(_slide.Shapes[n].AnimationSettings.Animate==Microsoft.Office.Core.MsoTriState.msoTrue)
{
_so.Animation = (int)_slide.Shapes[n].AnimationSettings.EntryEffect;
}

Can I do anything similar with the exit effect (the effect that fades
the
object away)

Thanks,
Rob
 

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