Reading PowerPoint Animation Effects with VBA
I have been working with PowerPoint VBA, and have a grasp on mo开发者_Go百科st things.
What I am struggling with is reading the effect/animation settings for each object.
I seem to be able to get a lot of what I need through the Powerpoint.ActivePresentation.Slides(slide_id).TimeLine.MainSequence(seq_num)
What confuses me is how to convert the numeric value of Powerpoint.ActivePresentation.Slides(slide_id).TimeLine.MainSequence(seq_num).EffectType
to an effect (so looking for a table of values to effects or perhaps a CONST table).
Also, how to read in all the different level of effects (like entrance, or emphasis, etc) is really confusing. not to mention I cannot wrap my head around the timeline (which seems like it is not really a timeline).
Can anyone point me to any good articles or documentation that discusses how to read the effects and animations properly and fully?
If you have some specific code that can demonstrate what is happening versus what you're after, that may be more helpful in determining what is failing for you. As far as I can discern, you're looking for a way to see the constants for the EffectType values, is that correct? Have you tried the EffectInformation
object?
Here are some good primers on Animation in general:
MSDN:
- Creating Animation Sequences in PowerPoint 2002 and PowerPoint 2003 (Part 1)
- Creating Animation Sequences in PowerPoint 2002 and PowerPoint 2003 (Part 2)
MVP Article
- Timeline – The animation engine in PowerPoint 2002/2003 - Part I (there never was a Part II published)
Note that PowerPoint 2002 throught to 2010 uses the new Animation engine so all/most 2002 samples will be applicable to later versions.
For enumerations of the various effect values, see: https://learn.microsoft.com/en-us/office/vba/api/powerpoint(enumerations)
精彩评论