Creating Multiple Highlighter Tools

by Allen Wyatt
(last updated March 5, 2016)

4

Rob uses different colors of highlighting for different purposes, all in the same document. He finds it very tedious to change color each time he wants to highlight something. Rob wonders if it is possible to set up multiple highlighters, each with a different color, so that it only takes a single click to pick which highlighter color he wants to use.

A good number of people suggested the approach of creating a style to handle this. The problem is, you cannot use a highlighter color as part of a style definition. All you can do is to specify in the definition either a text color or a background shading color. It is this second item (a background shading color) that is closest to a highlighter color, but they are still not quite the same in how they are treated by Word.

Assuming you really need to use highlighter colors, the only real way to do it is to create macros that apply each of the colors you want used. Each macro would be quite short. For instance, here is the macro to apply the yellow color to the selected text:

Sub HLYellow()
    Selection.Range.HighlightColorIndex = wdYellow
End Sub

Note that the color is assigned to the text using a color enumeration (constant) at the right side of the equal sign. The 15 possible colors that apply to the Highlighter tool's palette are as follows: wdYellow, wdBrightGreen, wdTurquoise, wdPink, wdBlue, wdRed, wdDarkBlue, wdTeal, wdGreen, wdViolet, wdDarkRed, wdDarkYellow. wdGray50, wdGray25, and wdBlack. In addition, if you want to remove the highlighter color, you can use the wdNoHighlight constant.

The trick is to create a short macro, just like this for each color you want to apply. (And, of course, the one that removes the highlighter color.) You can then add each of the macros to your Quick Access Toolbar or, if you prefer, associate a shortcut key with each of the macros so you can apply the highlighting using a shortcut. (How you add macros to the QAT or associate a shortcut key with them has been covered in other WordTips.)

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (2608) applies to Microsoft Word 2007, 2010, 2013, and 2016.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing without Opening

Want to print one ore more workbooks without the need of actually opening the file? It's easy to do when you rely on Windows ...

Discover More

Periodically Delete TMP Files

After using Word for a while, you may notice some "litter" of unused files on your hard drive. This tip explains how those ...

Discover More

Checking for Missing Quotation Marks

Word provides handy spelling and grammar checkers. The grammar checker won't catch everything, however. One thing it won't ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

MORE WORDTIPS (RIBBON)

Creating a Master Document Using Existing Subdocuments

If you decide to create a master document, it is easy to do by just adding one or more subdocuments to an existing document. ...

Discover More

Moving Master and Subdocuments

If you need to move master documents or subdocuments from one place to another on your computer, you have to keep in mind the ...

Discover More

Hyphenating a Selection

Word provides a hyphenation tool that can help you hyphenate words within a document. If you want to apply hyphenation to ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 1?

2016-03-05 17:47:13

Peter Thomas

Hi,
I actually did this before I submitted my hint for the tip. When I recorded the macro it would work over multiple selections in Word. But when I ran the macro later it would only work on the last of the selections as I found with this hint in Word 2016. Is there a way of creating the macro so that it works on all selections all the time?
Cheers


2016-03-05 11:19:27

Ron MVP

Pierre: yes, Highlights are so 1980's. That is when those colors were defined, in the days when they were the only colors available on computer displays!

There is an alternative, using paragraph shading. But is has the disadvantage of not being "findable". Highlighting is an attribute that the Find dialog can search for. Granted, it only searches for "highlight", not specific colors.

Dr. B: Yes, a slightly more complex macro could be written to offer you choice of colors, but that would require more clicks. You might as well just use the default button on the ribbon. Personally I prefer this direct approach, which is why I suggested it. Either a single click on a specific button on the QAT, or using shortcut keys to apply the specific color.


2016-03-05 10:42:21

Pierre Sundborg

A fine tip, but it again brings up the great shortcoming of highlights: Most are so dark (colors saturated) as to hide the text they highlight. Only about 5 are useful to me. Is there any way to have more light highlight colors?


2016-03-05 06:37:51

Dr. Bartolo

Better would be a more involved bit of coding (I am not up to writing it) bringing up a menu to select each colour [sic] from, with a separate macro to remove hihglghting.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing