Selective Formatting in Searches

Written by Allen Wyatt (last updated March 24, 2021)
This tip applies to Word 97, 2000, 2002, and 2003


Word includes a powerful find and replace feature that can be used to find all sorts of information and then replace it with equal aplomb. One thing you cannot do, however, is to search for information that has "mixed formatting" within it. For instance, you cannot search for the character X in regular typeface followed by the character Y in a monospace typeface.

There are, of course, ways around this, provided you are willing to use macros to do your work. For instance, your macro could do the following:

  1. Search for the next instance of XY.
  2. When found, examine the instance to determine if the desired formatting is present.
  3. If not, start over at step 1.

This approach, while easy to create, has only a limited utility. Since step 2 would need to be "hard coded" into the macro, going through the trouble of changing the macro to accommodate the formatting needs would only be of value if you have quite a few instances of XY that you are looking for.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1552) applies to Microsoft Word 97, 2000, 2002, and 2003.

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

Adding a ScreenTip

If you want people to know something about a hyperlink you added to your worksheet, one way to help them is to use ...

Discover More

Copying Named Ranges

Named ranges are a great tool to use in developing formula-heavy workbooks. You may want, at some point, to copy your ...

Discover More

Deleting Worksheet Code in a Macro

When creating an application in VBA for others to use, you might want a way for your VBA code to modify or delete other ...

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 (menu)

Finding Quoted Text in VBA

Macros are created for all sorts of purposes in creating, editing, and processing documents. You might want to use a ...

Discover More

Finding an Unknown Character

Sometimes the characters that appear in a document can be hard to figure out, especially if the document came from ...

Discover More

Searching for Multi-Byte Hex Codes

Need to find a character for which you only know the hex code? There are a few ways you can search for the information, ...

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 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon 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.