none
RETRIEVING NAME OF POWER POINT PRESENTATION RRS feed

  • Question

  •  

    Hi!

     

    This is something one of my friends at work have been struggling to find for several days now. We are trying to create a function that would check if a object in power point presentation has a certain animation attached to it.  Weird thing is that it is quite easy to retrieve a name of entry effect (something like: apppowp.ActiveWindow.Selection.ShapeRange.AnimationSettings.EntryEffect does the trick.) but the problem is it's just impossible to find where MS has hidden the Emphasis, Exit effects as well as Motion paths. You would think that they should be somewhere near but... well they aren't.

     

    Any suggestions?

    Thursday, September 27, 2007 3:10 AM

Answers

  • Hi Antinsh,

     

    We should iterate through MainSequence to get all the effect and test if it belongs to the current shape and if it is the shape’s exit effect. Try this code I wrote, which worked in my side. Wish it can help.

    Code Block

                for (int i = 1; i <= app.ActiveWindow.Selection.SlideRange.TimeLine.MainSequence.Count;i++ )

                {

                    PowerPoint.Effect effect = app.ActiveWindow.Selection.SlideRange.TimeLine.MainSequence._Index(i) as PowerPoint.Effect;

                    bool equal = effect.Shape.Equals(app.ActiveWindow.Selection.ShapeRange[1]);

                    if (effect.Exit == MsoTriState.msoTrue&&equal)

                    {

                        MessageBox.Show(effect.EffectType.ToString());

                    }

                }

     

     

     

     

    Thanks

    Ji

     

    Tuesday, October 2, 2007 5:38 AM
    Moderator