Applying a Character Style to Bracketed Text

Written by Allen Wyatt (last updated November 9, 2019)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and 2021


1

Kat has a document that has various words and phrases surrounded by double angle brackets, as in << this is my phrase >>. She needs to apply a character style to the text surrounded by angle brackets in this manner, but she's at a loss as to how to do so.

When it comes to this type of situation, you can easily use the Find and Replace feature of Word. Let's assume, to begin with, that you don't need to delete the angle brackets. In this case, follow these steps:

  1. Press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box.
  2. Click the More button, if it is visible. (See Figure 1.)
  3. Figure 1. The Replace tab of the Find and Replace dialog box.

  4. Select the Use Wildcards check box.
  5. In the Find What box, enter this: \<\<*\>\>
  6. In the Replace With box, enter this: ^&
  7. With the insertion point still in the Replace With box, click the Format drop-down list and choose Style. Word displays the Replace Style dialog box. (See Figure 2.)
  8. Figure 2. The Replace Style dialog box.

  9. Use the controls in the dialog box to locate and select the character style you want applied.
  10. Click OK to dismiss the Replace Style dialog box. The style name should appear just below the Replace With box. (See Figure 3.)
  11. Figure 3. Ready to replace.

  12. Click Replace All.

The key here is that you are doing a wildcard search. This allows you to specify a pattern that should be searched for. This pattern is entered in step 4—you want the two angle brackets, followed by any number of characters, and then followed by two opposite angle brackets. The backslashes in the pattern indicate that the character immediately following (an angle bracket character) is to be matched literally. This is required because the angle brackets would otherwise be interpreted by Word as special wildcard characters.

What you are replacing with (in step 5) is a code that indicates you want to replace whatever is found with the same characters that were found. Since the text that is found is replaced with the exact same text, the only real change is that the character style you specified in step 7 is applied to that text.

What can you do, though, if you want to delete the angle brackets as you apply the character style? This, too, can be done using the Find and Replace. In fact, the steps are the same as already outlined; the only change is that you need to modify what you are searching for (step 4) and replacing (step 5). Here's what you should search for:

(\<\<)(*)(\>\>)

Note that the only difference in this Find What pattern is the addition of the parentheses. In a wildcards search pattern, this simply "groups" what is found. In this case you are specifying three groupings—the opening angle brackets, the text between the angle brackets, and the closing angle brackets. You would then specify the following in the Replace With box:

\2

This indicates that you want whatever is found to be replaced with the contents of the second grouping, which means the text originally between the angle brackets.

Provided you followed all the steps previously outlined (with the two changes to steps 4 and 5), not only should the character style be applied, but the angle brackets should be removed.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13697) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and 2021.

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

MORE FROM ALLEN

Printing a Font List

Getting a list of fonts available in a document is not something you can easily do in Word. That is, unless you put the ...

Discover More

Entering Formulas in Excel

The way you signify that you are entering a formula is to start a cell entry with an equal sign. Here is the reason why ...

Discover More

Changing Page Orientation

Page orientation controls the way in which information is printed on the page. Here's how you can control the page ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Making Quoted Text Bold and Underlined

If your document contains quoted text, you might want a way to remove the quotes and format the text in some way. This ...

Discover More

Special Differences when Searching

Word includes two different search engines. Which search engine you choose to use will dictate what Word shows as ...

Discover More

Getting Rid of Trailing Spaces in Footnotes and Endnotes

The Find and Replace tool can get rid of trailing spaces in paragraphs quite nicely. If those spaces are at the end of ...

Discover More
Subscribe

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

View most recent newsletter.

Comments

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}] (all 7 characters, in the sequence shown) 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 0 + 7?

2019-11-09 14:26:49

Kat Lind

Thank you so much! This will save me hundreds of hours in a year!

With much appreciation - Kat


This Site

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.

Videos
Subscribe

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.