Over and Under Lines for Headings

M

mcp6453

What is the best way in Word 2000 to create a headline with over and
underlines, like this?

________
HEADLINE
________ (this line should be the underline of the word)

I tried borders and shading, but those lines go all the way across the
page, which I don't want. I tried highlighting the text before going to
borders and shading, but clicking on any side caused the whole word to
be outlined.
 
M

macropod

Hi,

If your headings have a common width, paragraph borders applying to an
appropriate style will do the job - simply use paragraph formatting to
define the heading widths.

Cheers
 
S

Suzanne S. Barnhill

There is no way to do this *easily*, but here are the two I've discovered:

1. Use paragraph borders (your first impulse, which is still good). The
advantage is that you can adjust the spacing between the text and the
borders to look good. The disadvantage is that you have to manually adjust
the left and right indents (or just the right if the heading is not
centered) of each heading separately. But the effect is quite nice.

2. Use a text border. This is what you were trying to accomplish by applying
a border to Text in the Format | Borders and Shading dialog. As you
discovered, you can have any border you like as long as it's a box. All that
border is is an EQ \x (box) field with no switches. But if you create the EQ
field yourself, you can apply the "box" to just the top and bottom. The
syntax for "HEADLINE" would be:

{ EQ \x \to \bo (HEADLINE)}

The effect this gives is not bad. You have no control over the distance
between the lines and the text, but it's acceptable in most cases. Note that
if you don't remove the trailing space from the field (between closing
parenthesis and closing field brace), you'll have a trailing space in the
field, but this won't affect centering or add to the border. If you do want
to extend the border, you have to add nonbreak spaces to the text in
parentheses.
 
G

Greg

If you like Suzanne's suggestion for the EQ field and you
would use this method frequently, you might apply the
following macro:

Public Sub Banner()

Dim Expr As String

Expr = InputBox("Enter the text to banner:", "Apply
Banner")
If Expr <> "" Then
ActiveDocument.Fields.Add Range:=Selection.Range, _
Type:=wdFieldEmpty, _
Text:="EQ \x\to\bo(" & Expr & ")", _
PreserveFormatting:=False
End If

End Sub
 
M

mcp6453

Greg said:
If you like Suzanne's suggestion for the EQ field and you
would use this method frequently, you might apply the
following macro:

Public Sub Banner()

Dim Expr As String

Expr = InputBox("Enter the text to banner:", "Apply
Banner")
If Expr <> "" Then
ActiveDocument.Fields.Add Range:=Selection.Range, _
Type:=wdFieldEmpty, _
Text:="EQ \x\to\bo(" & Expr & ")", _
PreserveFormatting:=False
End If

End Sub


Thanks. Works great (after removing the extraneous "). Are the over and
under line thicknesses adjustable?
 
B

Bob S

What is the best way in Word 2000 to create a headline with over and
underlines, like this?

________
HEADLINE
________ (this line should be the underline of the word)

I tried borders and shading, but those lines go all the way across the
page, which I don't want. I tried highlighting the text before going to
borders and shading, but clicking on any side caused the whole word to
be outlined.


Graham Mayor once suggested the following approach to producing them.
Format the heading style without extra vertical spacing. Create a
single-cell table, set the cell so that the text is vertically
centered, and/or adjust the text margins to make the text look
centered. You may also want to reduce the left and right text margins
so that the border doesn't "start early" or "end late". Use Table |
Table AutoFit | AutoFit to Contents so that the table length matches
the length of the text. Use Format | Borders and Shading to apply top
and bottom borders of the desired intensity. Save the table as an
AutoText entry and insert it whenever you need tramlines. Since the
heading is in a table cell, it will not appear in outline View.

Another approach that I dreamed up is to include a Frame in the
heading style, and apply top and bottom paragraph borders. The frame
(with width set to Auto) keeps the borders from running the full
length of the page. (They will look full width in Normal View, but
should print correctly.) The heading will appear in Outline View.

Bob S
 
S

Suzanne S. Barnhill

The frame (with Before and After wrapping) sounds like a good approach to
me.
 
Top