|
"My Custom Highlighter" can be used
as a Word Add-In
that will hopefully offer a solution to the problem of odd and often too
dark highlighter colors available with the standard Word highlighter
tool. |
|

|
|
My Custom Highlighter uses a UserForm to provide you a quick and simple
interface to apply a range of "subdued" font shading to your text.
Unfortunately it does not act as a painter like the built-in
highlighter tool.
You must select the text you want to apply shading to and then click the
desired shading color. You can use the "None" command to
remove previously applied font shading to selected text or the "Remove
All" command to clear all font shading from your document .
Note: It is important to remember that
this Add-In applies "shading" to text. While it may be more
pleasing to the eye and easier to read, it is not "highlighting" in the
sense that Word uses that term. It will not react as expected in
a "find and replace" operation or be recognized as highlighting in a VBA
procedure. |
|

|
|
I have provided eight subdued colors shown above. If you know a
little about VBA you can easily change these colors or add your own.
The range of actual shades that you can create and apply to your text is
practically endless. The colored "buttons" on the UserForm are simply
label controls with a backcolor property applied that matches the font
shading backcolor applied in the document. You can add new
controls (and associated code) or modify the exiting controls and code.
The backcolor of the label controls are set in the UserForm_Initalize
event: |
|
Private Sub UserForm_Initialize()
Me.Label1.BackColor = 10092543
'Or wdColorLightYellow or RGB(255, 255, 153)
Me.Label2.BackColor = wdColorLightGreen
'Add any remaining labels. The
color value can be a constant value if exits (e.g., wdColorRed,
'a long value, or a RGB {red, green, blue) value as shown in above.
End Sub |
|
The shading is applied to the selected text with a Label_Click event.
The BackgroundPattern color is simply set to the same value as the
control back color. Again constants, longs, or RGB values can be
used. |
Private Sub yourLabelName_Click()
Selection.Font.Shading.BackgroundPatternColor = RGB(163, 209, 255)
End Sub |
|
An auxilary macro is provided to help you determine the long or RGB
value of any custom color. Both the My Custom Highlighter tool and
auxilary macro can be called from a toolbar attached to the Add-In. |
|

|
|
Simply click the Color Data command to determine information on any
constant or custom color you wish to identify. When the macro is
executed a the data is displayed as shown below: |
|

|
|
The Add-In is provided here in a zip file format.
You can download "My Custom Highlighter" to your Word Templates
directory and load it using Tools>Templates and Add-Ins. For more
on Add-Ins and how to load them, see the heading "Organizing Global
Templates" at:
Organizing Your Macros Note:
One user has reported problems using Add-Ins that I have available on
this site due macro
security settings. He indicated that he resolved the problem by
digitally signing the project and trusting the publisher. For
steps perform this requirement see:
Digitally Sign Project |