h1

Word: Make some specific text bold

September 14, 2018

As most people would know, you can apply bold formatting in Word using Ctrl+b or the Bold icon on the Home table on the Ribbon.

But what if you want more? What if you have some specific text scattered throughout your document that you want to make bold in one action? This was the issue Colin faced. In a comment on one of my other blog posts, Colin asked if there was a way to apply bold a set of characters that all started with the same code, but had different numbers after that code (e.g. like product codes). In his example, he had a lot of instances of VA-001, VA-002, etc. with the last three digits being different each time. He’d tried the method I’d documented in my earlier post, but he could only bold part of the code, not all of it.

As with any find and replace, once you identify the pattern, it’s easy enough to test various ways of finding a match and then applying the change to it. I figured out two methods—both using wildcards. The first method assumes there are only ever three characters (not, 1, 2, 4, etc.) after the VA- part, while the second applies to any length of the ‘word’ after VA-.

For both methods, open the Find and Replace window (Ctrl+h), click More, then check the option for Use wildcards.

Method 1: Only three characters

  1. In the Find field, type: (VA-)(???)
  2. In the Replace with field, type: \1\2
  3. With your cursor still in the Replace with field, click Format, then Font, then select Bold. You should see Font: Bold directly below the Replace with field (see screenshot).
  4. Click Replace a few times to make sure the find/replace is doing what you expect it to. Once you are satisfied, you can click Replace All.

Notes:

  • In the Find, the code is separated into two parts, both surrounded by parentheses—the VA- part, which is a constant in what Colin had, and three question marks (???). A single question mark represents any single character, so by typing three question marks, you’re asking Word to look for ANY three characters (letters and/or numbers) after the VA- part. If you only had two characters, then you’d type two question marks; if you had 4, then you’d type four, etc.
  • In the Replace, you’re replacing what was found in both parts with itself. In other words, you’re not changing anything. What you are doing in the Replace, though, is specifying that what you find and replace with itself is now bold (step 3).

Method 2: Any number of characters

  1. In the Find field, type: (VA-)(*>)
  2. In the Replace with field, type: \1\2
  3. With your cursor still in the Replace with field, click Format, then Font, then select Bold. You should see Font: Bold directly below the Replace with field (see screenshot).
  4. Click Replace a few times to make sure the find/replace is doing what you expect it to. Once you are satisfied, you can click Replace All.

Notes:

  • In the Find, the code is separated into two parts, both surrounded by parentheses—the VA- part, which is a constant in what Colin had, and an asterisk followed by a right chevron arrow. The asterisk represents any number of characters from one to infinity. Because a ‘character’ in Word could be a space, you don’t want it to find EVERY character after the VA- part—you’d get the whole document! So you add the > to tell Word to stop at the end of the ‘word’ it finds. In other words, it will stop at any character that typically follows a set of adjacent characters (a ‘word’), such as a space, period, comma, colon, semicolon, etc.
  • In the Replace, you’re replacing what was found in both parts with itself. In other words, you’re not changing anything. What you are doing in the Replace, though, is specifying that what you find and replace with itself is now bold (step 3).

[Links lat checked September 2018]

One comment

  1. Dear Rhonda

    Thank you for this post. Very useful! I wonder, is it possible to do something similar in reverse? For instance, if I wanted to apply a format to all the words ending in ‘ing’

    Tessa



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: