Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Event in Microsoft.Office.Interop.Word

Is there any event in the above mentioned namespace to fire when any change occurs or when document edited ,for instance, text input occurs

I tried

Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSelectionChangeEventHandler
&
Microsoft.Office.Interop.Word.ApplicationEvents4_EPostageInsertEventHandler

But i can't trigger an event whenever i insert text in active word document.

like image 911
Farooq Ahmed Khan Avatar asked Nov 13 '22 08:11

Farooq Ahmed Khan


1 Answers

Unfortunately the Word object model does not expose any key press events,

List of Word events - Document Events

You could try implementing a global keyboard hook to achieve what you're looking for through Win32 API.

like image 143
Denys Wessels Avatar answered Nov 16 '22 04:11

Denys Wessels