Adding a Box Around Selected Text

by Allen Wyatt
(last updated May 20, 2011)


In other WordTips you learn that you can quickly and easily add borders around paragraphs of text. You can also add borders around words or characters within a paragraph. This is done by using some of the special field formatting capabilities of Word. To add a border around text within a paragraph, follow these steps:

  1. Position the insertion point where you want the boxed text to appear.
  2. Press CTRL+F9 to insert field braces.
  3. Within the field braces, type EQ \x(text), replacing "text" with the text you want boxed.
  4. Press SHIFT+F9 to show the results of the field.

As an alternate way of performing the same task, you can follow these steps:

  1. Position the insertion point where you want the boxed text to appear.
  2. Choose the Field option from the Insert menu. This displays the Field dialog box. (See Figure 1.)
  3. Figure 1. The Field dialog box.

  4. In the left side of the dialog box, choose Equations and Formulas as the category of field.
  5. In the right side of the dialog box, choose Eq as the field name.
  6. Click on the Options button.
  7. Choose \X() as the switch you want to use, then click on Add to Field.
  8. Within the field text box, position the insertion point between the two parentheses.
  9. Type the text you want to appear as boxed.
  10. Click on OK twice.

You should note that the text around which the box will appear should all be on the same line. If the text wraps across a couple of lines, the results will not be as desired.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (166) applies to Microsoft Word 97.

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. ...


Calculating Expressions

Word can do some simple calculations for you, if you add a little-known tool to your toolbar. Here's how to add and use ...

Discover More

Inserting the Date in a Header or Footer

Need today's date in the header or footer of your document? Here's how to get it there easily.

Discover More

Converting Automatic Numbering to Manual Numbering

The automatic numbering that Word lets you apply to paragraphs in your document can create some great looking content, ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (menu)

Creating a Drop Cap

Drop caps can be a nice finishing touch for some types of documents. Word allows you to create three types of drop caps, ...

Discover More

Creating Thin Spaces

Thin spaces are a typographic device that allows you add a bit of space between elements of a document. There are no thin ...

Discover More

Quickly Decreasing Point Size

A shortcut for decreasing the point size of a font.

Discover More

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

View most recent newsletter.


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. Maximum image size is 6Mpixels. 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 6 + 1?

2018-11-27 11:11:51


Solved the problem myself. I'm using Window 10. By selecting "Unicode UTF-8 for world wide language support" under "Language for non-Unicode programs" > "Change system locale", I was able to use this fantastic macro for Unicode text.

2018-11-26 07:39:35


I'm using Word 2007, it works perfectly. Thank you.

But unfortunately, it is not Unicode compatible and I am unable to use it to search Chinese text. Can the code be modified to be Unicode compatible?

This Site

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

Newest Tips

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.