Secrets of the Office Masters: Custom Toolbars for Quick Highlighting
While working on this book, we regularly used Word's yellow and green highlighters to mark text for specific tasks and then cleared the highlighting when the task was complete. Because Word's Highlighter icon remembers the last color you select, this routine often takes two clicks—one click to display the drop-down list of available colors and a second click to select a color (or None, to erase highlighting).
To make highlighting a one-click process, we first created three nearly identical macros, using the following code:
Public Sub NoHighlight() Selection.Range.HighlightColorIndex = wdNoHighlight End Sub Public Sub YellowHighlight() Selection.Range.HighlightColorIndex = ...