Search and replace in Microsoft Word for uppercase, lowercase, and formatting

Someone asked in the post on advanced search in Word, how you could search for "APLOMB" and change it to "aplomb" or "Aplomb".

The trick is to use the Match Case checkbox, like so:


If when you open search/replace you can't see these advanced options, then click the More button.

This example will match every instance of APLOMB in uppercase. (Notice it says Match Case in the line labelled Options). It will change to AplomB with a capital A and B, because that's what I wrote in the replace box.

This will work with any combination of upper and lower in the Find box. The replacement text will appear exactly as you write it in the replace box.

A much more useless but fun thing you can do is use search & replace to change the formatting of words. Here's an example.

Do the search/replace as before, but when you get to the replace dialogue, click the Format button and select Font (or anything else you like, but I'm using Font in the example).



This gives you the font formatting dialogue box. The example below searches for and replaces the word APLOMB, but not does not change the letters. It changes the font to 26 point, bold italic, comic sans in bright pink. Because, basically, I'm very weird.



The Effects section is very interesting. See all the effects options with filled in checkboxes? That means whatever the formatting currently is, leave it alone. That's the default and it does nothing.

If you click an effect checkbox once, it becomes a tick. That means change the formatting of whatever matches the search to include that effect. I've clicked Outline, so any word that matches will become an outline, as you can see in the preview.

If you click an effect checkbox a second time it completely blanks, which means turn off whatever the effect is. In the example I unchecked the Hidden effect, which means if any matching text had been hidden then it would have been revealed.

When you click OK on the font dialogue, and then click Replace All on the replace dialogue, it will turn every instance of APLOMB in your document into this large, pink, outlined abomination.

You can set virtually any formatting you like, if you can find it under the Format button.

I've never found a single practical use for this feature, but there you are, in case you can think of one.

9 comments:

RWMG said...

The abominable aplomb? Is that a yeti subspecies?

Gary Corby said...

The abominable aplomb is what you get when you call for the first plumber you can find in an emergency.

Sherri said...

Changing the font might be helpful when trying to determine at a glance which characters are in a scene, or how many times you use the word aplomb. I usually use highlight, but changing the font is more fun.

_*rachel*_ said...

Such aplomb to use the word in such a manner!

I want to see an abominable aplomb in a story sometime.

VR Barkowski said...

I occasionally use the font feature with bright color and strikethrough when I'm copyediting/critiquing for someone who overuses a particular word: just, that, even. etc. Then I can spot them easily, see where they're grouped. It's easier to remove the strikethrough from the few correct uses than to add the strikethrough to all the repeats. Yeah, my critique partners love me...

Gary Corby said...

Hi VR, at last I've met someone who has a use for format replace!

I'm sure your crit partners do love you if you can help make their mss better.

Susan Quinn said...

If you're going to use a word like aplomb, you should definitely put it in large purple letters!

I was using search/replace/highlight just today, trimming out a bunch of ellipses from my MS. Those little guys are shockingly hard to see - but not when they're YELLOW.

Thanks for the tips!

Gary Corby said...

You're welcome Susan!

Eric said...

Of course I came across this post only AFTER I'd added for alternate solution on the "Aplomb" question in your advanced search in Word post.

I would be seriously hampered in my document cleanup procedures without the ability to include format in Find and Replace.

Amongst other tricks, I routinely use it to apply styles. For example, with <[A-Z]{3,}> in the Find what and ^& with Format: Style: Acronym in the Replace with box, all words consisting of 3-or-more uppercase letters will be tagged with my custom Acronym character style.

My style can then define the type of format I want (plus any language setting as applicable). Even better, I can then use the "Find In" button to select and copy all acronyms out to create a list.