Hi forum members, I’m checking the events that common user creates, but I couldn't find the text when is written in Microsoft Word, the only clue is that I got a EVENT_OBJECT_LOCATIONCHANGE windows message from the caret that is in a window wich has "_WwG" class name when I type words in the document , do you know a function to get text from this window , I have already used Getwindowstext but I only got the window name and I have used the IAccessible::get_accValue function but didn't work, (I work in vc++ and I use SetWinEventHook hook and IAccessible interface)
tanks in advance

How to get the text from MSWord?
sjr1170
You can use the "Word.Application" object and you can use the ROT (Running Object Table) to look it up. Having the Word.Application object it is easy to find the active document.
psmukilan
If you are only interested in the characters that a user types. It shoud be enough to use a keyboard Hook. WH_KEYBOARD
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp
May be it is easier to use the automation interface for Winword.
http://msdn.microsoft.com/library/en-us/dv_wrcore/html/wroriautomatingofficeapplications.asp
derohanes