How do I 'attach' to a paragraph in a PowerPoint Text Frame?

U

Uzi

Hi all
Text bullets in a PowerPoint text frame are represented as
'paragraphs' which are 'TextRange' objects
Within my add-in, I have information associated with specific
paragraphs in a text frame, for example, certain data is associated
with paragraph number 2.
The problem: when a new paragraph is inserted by the user above
paragraph 2, for example, after paragraph 1, my paragraph 2 now becomes
paragraph 3 and the newly added paragraph is now paragraph 2.
Since a paragraph is not a shape on its own but rather, a 'TextRange'
object, which it's properties change depending on the paragraph
content (text, start position, length), how can I maintain the
association between my data and a paragraph?
I know it must be possible because it happens when an animation effect
object is associated with a paragraph: when a new paragraph is inserted
above the animated paragraph, the animation effect stays connected to
it's original paragraph. But how??
Thanks!
Uzi
 
T

TC

Could you create a named Range for the first word of the paragraph?
Then, that range will move when the paragraph moves, but the name of
the range will stay the same.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top