Question

Here is a screenshot of some example slide. I have an animation on the word "Pizza". I am trying to find where in the string this occurs by character number.

example slide My code to grab information about the animations:

foreach (PowerPoint.Effect effect in slide.TimeLine.MainSequence)
        {
            animationMap[animationCount] = new WBLAnimation(effect,shapeMap[effect.Shape.Id],effect.TextRangeStart,effect.TextRangeStart+effect.TextRangeLength);
            animationCount++;
        }

Pizza should start at around character 11, but instead the TextRangeStart property claims that it starts around character 80. TextRangeLength is also wrong. It claims it is 71 characters in length, when it should be 6 (length of "Pizza?"). To me this seems to be counting the entire length of the textrange rather than the animated part.

WBLAnimation is just a helper class. It takes an effect, a shape, start position of the shape, and end position. This eventually needs to be refactored. This is just an example of how I am getting this information so someone might point out what I am doing wrong.

Is there another way to find where in the string the animation is occuring?

Thanks!!!

Was it helpful?

Solution 2

So apparently there is a bug within powerpoint. TextRangeStart will always point out the last paragraph in the animated text range: http://answers.microsoft.com/en-us/office/forum/office_2010-powerpoint/where-can-i-find-the-start-and-end-of-the-text-in/43a16276-8abc-4cb2-9753-46c7119e7618

Now since that is the case, what I did was match up the paragraph index of the animation with the shape and find the character index from there. It is round about, but it works...

I am trying to work on work on a ppt to html converter of sorts. It uses RaphaelJS to render all of this stuff. If anyone wants to contribute check out: https://github.com/parris/tilda ... I am going to make a pretty good commit within the week.

Thanks for the help everyone.

OTHER TIPS

I believe animation always apply to objects. This means that you do NOT have an animation on the word 'Pizza'. You have an animation on the object (a textbox?) that contains the word 'Pizza'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top