Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Adding Vertical Lines at the Sides of a Word.
Written by Allen Wyatt (last updated April 12, 2025)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
{eq \b \bc\| ( myword )}
When you collapse the field (put the insertion point within the field code and press F9) you end up with "myword" centered between the pipe characters.
Another method is to simply type your word and then format the paragraph so that it has borders at the left and right sides. Follow these steps:

Figure 1. The Borders and Shading dialog box.

Figure 2. The Advanced tab of the Font dialog box.

Figure 3. The Cell tab of the Table Properties dialog box.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (6828) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Adding Vertical Lines at the Sides of a Word.
Discover the Power of Microsoft Office This beginner-friendly guide reveals the expert tips and strategies you need to skyrocket your productivity and use Office 365 like a pro. Mastering software like Word, Excel, and PowerPoint is essential to be more efficient and advance your career. Simple lessons guide you through every step, providing the knowledge you need to get started. Check out Microsoft Office 365 For Beginners today!
Need to get rid of the formatting applied to a bunch of text? One of the easiest ways to do this is to use Notepad in ...
Discover MoreWhen adjusting the position of things on the Ruler (like tab stops), you can use the Alt key to get very precise in your ...
Discover MoreFonts are essential to getting your text to look just the way you want it to look. If you have a font that you use in a ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-04-13 13:22:37
Biddy Greene
Hi
Why can't one just look for wrong commas in numbers by looking for (e.g.)
,^#^#^#^#, (^# being "any digit") ?
Also why can't one just put in vertical lines on either side of a word by just using the vertical line key (above the slash key), like this: |word| ?
Biddy Greene.
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments