![]() |
#1
|
|||
|
|||
![]()
So,
I would like to run some code if a user clicks on a word/phrase only if it is highlighted. Essentially, no matter where they are in a document, i will have 5 words/phrases highlight for them dynamically. I do not know what words they will be, or where they will be at, and they will not be selecting/(clicking and dragging) their cursor over the. I simply want the user to see these 5 highlighted words/phrases, they be like 'Oh the first two don't matter but i need the third one' and then they press alt while left clicking.... that would then trigger my code which says, hey, is the word they user is alt-clicking over highlighted? it is? Awesome, do this. p.s. I have all the highlighting code done. I just need to know how an alt-click over something would ask a macro determine if that alt-click in fact happened over highlighted text. Thanks! |
#2
|
||||
|
||||
![]()
Aside from what you might be able to achieve via the WindowSelectionChange event (see my reply to your other thread), I think you'll be limited to something you could invoke via a keyboard shortcut, not including Alt-Click, unless you develop a Windows API-based process. The latter is well outside my area of expertise.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActiveX Command Button disappears after click | Bengt | Word VBA | 1 | 09-18-2013 12:42 PM |
![]() |
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |
![]() |
nkg | Word | 1 | 02-19-2012 07:21 PM |
Word doc bug when closing from userform command button click macro | Joe Patrick | Word | 1 | 07-05-2011 08:53 PM |
Add-In:How to add command right click command bar | phang | Outlook | 0 | 01-15-2007 02:53 AM |