Written by Allen Wyatt (last updated July 31, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
Daniel has a long document that has many instances of bolded words interspersed with non-bolded words. He would like a way to delete all instances of regular text that appears between bolded text. Thus, "bold text with lots of regular text in the middle then more bold text" would be changed to "bold text more bold text." Daniel wonders if this be done with Find and Replace or if it requires a macro.
This can be done with Find and Replace, but you may want to think through if you really want to do it. As asked, it appears that Daniel wants to, effectively, delete all regular (non-bolded) text in the document. For instance, consider the situation where you have (1) bold text, followed by (2) non-bold text, followed by (3) bold text, followed by (4) non-bold text, followed by (5) bold text. You have, in this case, three instances of bold text (1, 3, and 5) separated by two instances of non-bold text (2 and 4). How does this get handled? As written, in Daniel's scenario, the two instances of non-bold text should be removed because they are bounded by bold text. Thus, all of the non-bold text is removed.
Here is how you would handle this in Find and Replace:
There are two gotchas you need to be aware of in doing this, and those gotchas are the reason I said you may want to "think through" if you really want to follow this route. First, since Find and Replace removes all non-bold text in the document, any non-bold text at the very beginning or very end of the document will be removed, even though they are not bounded on both sides by bold text. Second, you may end up with bold text not separated by spaces. This would occur if there were no bold-formatted spaces between two occurrences of bold text.
It is also important to realize that this approach is not discerning when it comes to what is between bolded text. It is very possible that your hard returns at the ends of paragraphs will be deleted, unless they are formatted as bold. This can result in some funky looking text when all is said and done.
If you want something a bit more discerning, then the most prudent approach would be to create a macro that can perform a more detailed analysis of the document and remove only what you actually want removed. Developing such a macro would be dependent on coming up with rules that you want applied to the entire document and then codifying those rules in the macro itself.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13889) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.
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!
When using Find and Replace, it is possible that you might notice some surprising results when the replacements are done. ...Discover More
If you have a document that contains optional hyphens (special characters that mark where a word can be split between ...Discover More
If your document contains quoted text, you might want a way to remove the quotes and format the text in some way. This ...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.
Visit the WordTips channel on YouTube