Search code examples
vbaanimationpowerpoint

How to know animation type in VBA


I want to know what animation type is in each shape that I found in a presentation. I am using the following lines for that:

 'to know if the shape has animation 
 If ActivePresentation.Slides(slideNum).Shapes(shapeNum).AnimationSettings.Animate = msoTrue Then
    animationType = ActivePresentation.Slides(slideNum).Shapes(shapeNum).AnimationSettings.EntryEffect

With there in some cases I can different answers like ppEffectFlyFromLeft or ppEffectFlyFromRight but for example for Fade and Zoom animation type the result is ppEffectCut and I cannot find any other variable that says me what kind of animation is. Where can I find the variable that gives me that information?


Solution

  • I found the animation type here:

    ActivePresentation.Slides(slideNum).TimeLine.MainSequence(shapeAniNum).EffectType 
    

    Hope it will help to someone.