This project has moved and is read-only. For the latest updates, please go here.

Capturing text in a document

Jan 30, 2014 at 12:02 PM

I have created a 2007 word addin targetting 4.0. How do I create an event that triggers if the user changes the text in a specified location in the document (ie triggers if a single character changes). Then set that text to a string valuable. I was thinking I should use the Selection Class to target the location however I was hoping that there is a specific class/method that targets the user input text event.

Jan 30, 2014 at 12:21 PM
Unfortunately there is no straightforward way to do this.

WindowSelectionChange event will be triggered when anything is changed in Word by mouse click or keyboard.
You can hook in to low level keyboard events like this if you are keen only on keyboard press events.