Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Retrieve word from word doc on mouse right click using Word Automa

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kaustav - 26 Sep 2006 14:14 GMT
Hi,

How can I get the word in a MS Word document when we right click the mouse
on it or when the cursor is at the word's end. I am not selecting the word
out here.

It is like similar to what MS Word offers when we right click any word and
select "Lookup" from the context menu or use "Spell Check" for it.
zkid - 03 Oct 2006 03:32 GMT
If you are looking for programming...

I'm not entirely sure if I understand what you need, but this code will
place in a variable whatever word the cursor is abutting (either front or
back) or on:

Dim strWord as String

strWord = Selection.Range.Words(1).

If you're trying to rewrite how your context menu works (right click), then
maybe this code from Excel will give you a head start:  
http://exceltips.vitalnews.com/Pages/T0144_Adding_Items_to_a_Context_Menu.html

The cursor remains where it was and the word is not actually selected.

> Hi,
>
[quoted text clipped - 4 lines]
> It is like similar to what MS Word offers when we right click any word and
> select "Lookup" from the context menu or use "Spell Check" for it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.