Suppose I have a TextRange
object, and I need to find the Shape
that contains that TextRange
.
Normally, I can use the Parent
property of the TextRange
to get the TextFrame
that contains it, and then use the Parent
property again to get the Shape
.
However, if the text is within a table cell, the Parent
property of the TextRange
is Nothing
. (I think this is a "feature" of PowerPoint 2010). EDIT: this is not true except when accessing the TextRange via Selection.TextRange.
Is there any other way I can identify the shape (which in this case would be the table cell)?
UPDATE: thanks to KazJaw, I have looked at this again, and it turns out I can navigate up the Parent
chain unless the TextRange
I'm starting from was obtained from Selection.TextRange
. For my purposes, this is less of a problem.