Using Application.OnMessage within Word

Add-in Express™ Support Service
That's what is more important than anything else

Using Application.OnMessage within Word
 
Mark Stevens




Posts: 41
Joined: 2014-09-15
Is it possible to use the Application.OnMessage event from within a Word application?

I've tried it without any success. I've set the Application.Handle to the ActiveWindow in the AddIn initialisation.

Thanks
Posted 25 Mar, 2015 19:45:04 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hello Mark,

You can use Application.OnMessage event only on a modal form. This is because TApplication.Run isn't called for a DLL and TApplication's message loop isn't processed.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2015 02:42:20 Top
Mark Stevens




Posts: 41
Joined: 2014-09-15
Ok, thanks for that.
Posted 27 Mar, 2015 10:38:25 Top