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.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
It's easy to apply formatting to text, but often hard (after the fact) to know exactly what was done. If you often need ...
Discover MoreLegal documents often use automatic line numbering for their documents. If you want to format those line numbers, you can ...
Discover MoreNeed to get rid of direct, explicit formatting applied to a document? Here's an easy way to do it using familiar Word tools.
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