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.
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!!!