Srdjan Klasnja
Posts: 12
Joined: 2014-01-10
|
Hi,
I'm using Add-in express 7.4 to build Word 2010 Add-in.
I need to register a listener on a left mouse click event.
So far I found that I can listen to a right and double click using Application.WindowBeforeRightClick and Application.WindowBeforeDoubleClick events.
My application need to get the index of a character where the user has left clicked, so my idea is to use a Selection on left click event. Is there a better solution?
Thanks in advance,
Srdjan |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Srdjan,
the word object model doesn't provide such an event. You need to look into consequences of clicking the document. Say, if clicking modifies the selection, see the WindowSelectionChange event. If this event doesn't occur (I remember this event doesn't occur when using the Navigation Pane), you'll need to check the current selection in the CommandbarsUpdate event; this event fires really often and ineffective code may influence the overall performance of Word.
Andrei Smolin
Add-in Express Team Leader |
|
Srdjan Klasnja
Posts: 12
Joined: 2014-01-10
|
Helo Andrei,
Thank you ofr this response.
Can you sugest me which key combination I should use in that case to asociate my action with that event?
Is the CTRL + left click OK?
Regards,
Srdjan |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Srdjan,
As explained, the Word object model doesn't provide such an event. You need to trace the selection as explained in my previous post.
Andrei Smolin
Add-in Express Team Leader |
|