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

Adjusting Shadow Settings

Insert a graphic into a document and Word allows you to add a shadow behind the graphic. You can also adjust the ...

Discover More

Word Styles and Templates

Styles are at the heart of Word's formatting power. Understanding how to use styles can greatly increase your ability to ...

Discover More

Determining Contract Weeks

Everyone seems to determine the difference between dates differently. Nicole has a need to calculate contact weeks (the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Copying Found Items to a New Document

Word allows you to use its searching capabilities to easily find multiple items in a document. What if you want to copy ...

Discover More

Find and Replace in a Column or Row

Need to search for information in a table? Word allows you to easily limit your search to an entire column or row, as ...

Discover More

Finding the Previous Occurrence

Using Word's Object Browser, it is very easy to move among different instances of what you want to search in your ...

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 one less than 9?

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.