get the word under the mouse in an ms-word document 1235711

T

Tamir

Hi,
Im writing an ms-word addin.
Is there a way to locate and/or get the word under the mouse in an ms-word
document.
I know that I can get the whole range and manually locate that word, but I
hope there is an easier way - I need to do it for each major movement of the
mouse, and thus, it needs to be as efficient as possible.

Best regards.
 
C

Cindy M.

Hi =?Utf-8?B?VGFtaXI=?=,
Im writing an ms-word addin.
Is there a way to locate and/or get the word under the mouse in an ms-word
document.
I know that I can get the whole range and manually locate that word, but I
hope there is an easier way - I need to do it for each major movement of the
mouse, and thus, it needs to be as efficient as possible.
No, unfortunately the Word application exposes NO events for the mouse. If the
user actively clicks on the word, then yes, you can get it like this:
stringTheWord = wdApp.Selection.Words(1).Text

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top