I am creating a MS Office Word Add-in in C#. I need to get some information from the Document while working with it.
I take a certain Range
of the document and save it.
For example, in the text:
Text1 text2 text3 text4
I save Range
of the "text3". Its Start
position = 13, End
position = 17 (the number of characters, as I understand it).
If I change the text in front of this word:
Text1 NEW TE XT te xt2 text3 text4
Positions of its Range
will remain the same. When trying to select the text I get an incorrect text range.
Is there a way to update the data of the Range
object after editing the document?