# Overlining Characters

It is not uncommon to underline characters in your documents. This is typically done for some sort of emphasis. Overlining characters, however, is a bit trickier. Normally you use overlining for documents about electronics, where an overline indicates that the signal line is "active low."

There are many ways you can overline your characters, including searching for special fonts that include the overlines (such as the public-domain SPAtlantis font) or using the Equation Editor (the Underbar and Overbar templates are quite helpful). These solutions, however, can lead to additional problems. For instance, using a special font means that the actual characters used won't match the characters used in the rest of your document, and if you send the document to someone else, you need to make sure you embed the font or provide the font to the other person separately.

The best solution we have found is to use special field commands supplied with Word. For instance, if you wanted to use an overline on the W character, you could do the following:

1. Position the insertion point where you want the overlined character to appear.
2. Press Ctrl+F9 to insert field braces.
3. Type EQ \x \to(W).
4. Delete the extra spaces around what you typed (between the characters and the field braces).
5. Press Shift+F9 to show the results of the field code.

To change the character displayed, simply change the W in the field to a different character. A similar approach is to use the overline character and use a field to position it "on top of" another character. You can do this by following these steps:

1. Position the insertion point where you want the overlined character to appear.
2. Press Ctrl+F9 to insert field braces.
3. Type EQ \o(W,).
4. Position the insertion point between the comma and the closing parenthesis
5. Hold down the Alt key as you use the numeric keypad to type 0175. This inserts an overscore character.
6. Delete any extra spaces appearing in the field.
7. Press Shift+F9 to show the results of the field code.

Depending on the fonts you are using, either of the foregoing may result in overlines that are a bit too long for your liking. If you want an overline that is more closely related to the size of the character you are using, try these steps (again using a field):

1. Position the insertion point where you want the overlined character to appear.
2. Press Ctrl+F9 to insert field braces.
3. Type EQ \o(W,).
4. Between the comma and the closing parenthesis, press Ctrl+F9 again. This places a second field, this one within the first field.
5. Type EQ \s\up10(_).
6. Delete any extra spaces within the two field braces.
7. Press Shift+F9 twice to show the results of the field code.

Regardless of which method you use, you can select the field and assign it to an AutoText entry so that it appears automatically when you type the entry.

You can also use a macro, if you prefer, to add the proper field codes. The following example macro prompts you for the character you want overlined, and then creates the field to overline it. The field used in the macro is the one you created manually in the last set of steps.

Sub Overline()
Dim sChar As String

sChar = InputBox("Enter character to overline", "Overline")

PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \o(" + sChar + ",)"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \s\up10(_)"
Selection.Fields.ToggleShowCodes
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Fields.ToggleShowCodes
End Sub


WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (268) applies to Microsoft Word 97, 2000, 2002, and 2003.

Related Tips:

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

 *Name: Email: Notify me about new comments ONLY FOR THIS TIP Notify me about new comments ANYWHERE ON THIS SITE Hide my email address *Text: *What is 5+3 (To prevent automated submissions and spam.)

Thanksgiver    08 Dec 2016, 02:38
Thanks! It worked for what I needed.
Tom the Toolman    25 Apr 2013, 09:11
I tried expanding upon this by having the macro detect whether there was a selection and prompting for text only if there was none; if there is text selected, it is deleted, and reinserted with the field codes wrapped around it. One problem is that I haven't found a way to detect whether multiple regions are selected (akin to Excel's Areas). Another is that if the selected text is surrounded by word spaces, Word removes the trailing one even if I use Selection.Delete as opposed to Selection.Cut. Otherwise, it works great. My next addition is to handle roman numerals. :-)

As always, the tips are much appreciated and serve both as helpful hints for current issues and learning tools for general reference.

# Our Company

Sharon Parq Associates, Inc.

# Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Excel Products

Word Products

# Our Authors

Author Index

Write for Tips.Net