by Allen Wyatt
(last updated November 9, 2019)
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:
Figure 1. The Replace tab of the Find and Replace dialog box.
Figure 2. The Replace Style dialog box.
Figure 3. Ready to replace.
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:
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 Word in Office 365.
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!
I do a lot of searching in my documents. Sometimes the searches may not go exactly as I expected. Here are some things I ...Discover More
Sarra is having a problem getting Find and Replace to behave properly when replacing italic-formatted text. This tip ...Discover More
Word allows you to use its searching capabilities to easily find multiple items in a document. What if you want to copy ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.