views:

302

answers:

1

Good afternoon,

does anyone know whether it's possible to handle content changes or more precisely whether there's an event for that... one that would notify me if a document's content has been changed (ideally at what position/range etc)?

Cheers and thanks, J

A: 

I am facing almost the same problem but I don't want to use events. I just want to find and convert text into Hyper Links but the problem is that Word does not return the position of the text through find method. So, I have to locate the text myself but wehn I try to make the change the doc.Range does not point to the actual text.

Could you please explain what is the difference between doc.Content.Text and doc.Range(start, end).Text

Actually, if I extract a string like

doc.Content.Text.SubString(start, lenofText)

and if I do the same with

doc.Range(start, start + lenofText)

I get correct result for doc.Content.Text but incorrect result with doc.Range ... do you know the reason? I need to find a text and then convert it to a Hyper LINK but the doc.Range does not give the me the correct results...

Kashif