Resting Anchor

The Anchorage

Personal website of Gregory K. Maxey, Commander USN (Retired)

Banner Text
(A Microsoft Word Help & Tip page by Gregory K. Maxey)

DISCLAIMER/TERMS OF USE

The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.

Click to acces PayPal Verification Service Click to acces PayPal Verification Service

However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.

If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!

Click to donate British Pound Sterling                   Click to donate US dollars                   Click to donate EU euros

This Microsoft Word Tips & Microsoft Word Help page shows you how to apply a simple eye catching banner using the Word EQ field and switches. For example, let's use the text "FOR SALE."

banner_text_1

If this method is utilized frequently, you might like to use the following simple macro:

VBA Code:
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

The field code or macro can easily be adapted to other nifty applications using the EQ field. For example, the following code can be used to create a single text over bar:

VBA Code:
Public Sub Overbar()
Dim Expr As String
  Expr = InputBox("Enter the text to overbar:", "Apply overbar")
  If Expr <> "" Then
    ActiveDocument.Fields.Add Range:=Selection.Range, _
      Type:=wdFieldEmpty, _
      Text:="EQ \x\to(" & Expr & ")",  PreserveFormatting:=False
  End If
End Sub
banner_text_2

The field modifiers \to \bo \ri \le can be used singulary or in combination to apply top, bottom, right, and left borders or any combination around the text. Omit all modifiers, leaving only the box switch \x for a complete border.

banner_text_3

Do you need to overstrike a letter or number? For the mathematical mean symbol you could use a \x box switch like in the previous example, but you have no control over the spacing of the over-score. As you can see in the example, it does not look as good.

banner_text_4

Create an overstrike EQ field as follows:

Site Note IconBonus Tip: Press CTRL+ALT+Keypad "-" minus sign to enter an em dash. Or you can use the ¯ (over-score symbol) by activating NumLock and press ALT+0175.

Would you use this frequently? It would be simple to edit the Banner or Overbar macros above, but if you used the same symbol frequently then a Building Block is a great alternative.  To create a building block, perform the following:

banner_text_5

Site Note IconNote:  With the introduction of Word 2007, AutoText was incorporated with Building Blocks.  See  my Building Blocks & AutoText for more information on these powerful tools.

The over-score can also be used as follows to create the "centerline" symbol.

banner_text_6

Site Note iconSee: Installing Macros for instructions on how to set up and use the macros provided in this tips page.

That's it! I hope you have found this tips page useful and informative.

Share

DISCLAIMER/TERMS OF USE

The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.

Click to acces PayPal Verification Service Click to acces PayPal Verification Service

However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.

If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!

Click to donate British Pound Sterling                   Click to donate US dollars                   Click to donate EU euros

Search my site or the web using Google Search Engine

Google Search Logo