I'm trying to trigger the highlight function in word, via a keyboard trigger. I don't like having to use the mouse for a common function. I'm being stymied because MS doesn't consider highlighting a command that I give a shortcut to. Is there a clever way to use the ribbon? (Short of recording a macro).
Yep. Look here:
A working macro is:
Sub Highlight_Selected_Text() CurColor = Options.DefaultHighlightColorIndex Application.ActiveDocument.Application.Options.DefaultHighlightColorIndex = CurColor Selection.Range.HighlightColorIndex = CurColor End Sub
BUT – you don't have to write a macro. The highlight command is available in the
Word-Menu-Bar > Tools > Customize Keyboard...
You can directly assign it a keyboard shortcut in Word.
Other choices are:
- Found Image.
- Possibly AppleScript UI-Scripting.
Chris - thanks I had forgotten to look on StackOverflow. Funny since I’ve been back on a MacOS my StackOverflow brain seems to have been disabled.
I wasn’t able to find the highlight command in the customize keyboard, I will check again in a few minutes.
FWIW A few minutes of fighting with word helped me find it in the Customize Keyboard list. Danke - Mark