h1

Word: Reformat text inside quote marks using wildcards

April 16, 2021

A user on an editors’ Facebook group wanted to know if they could use a wildcard find and replace to reformat (perhaps by using different coloured text, highlighting, bold, italics etc.) the text in between quote marks to distinguish the quotations from other text in the document.

This is an ideal job for using wildcards in Word’s find and replace.

But some warnings apply:

  • There are several types of quote marks—single, double, with straight or curly variations for these, and some people may even type two single quote marks to represent a double quote mark, or use prime and double prime characters to represent a quote mark. The only SURE way to identify the marks used by the author are to copy them from the document and paste them into the Find field.
  • This Find/Replace DOES NOT WORK with single straight quotes—the character used for an apostrophe and to start and end a quotation is the same, so you won’t get the results you expect. Any string of text between one apostrophe and another will also be captured.
  • Make sure the quoted passage has both a starting and ending quote mark. If the end quote mark is missing, the change will occur to ALL text from the beginning quote mark to the next end quote mark found, which could be some pages away.
  • Beware of apostrophes used within a quotation when the quotation is surrounded by single curly quote marks—the Find will find up to the apostrophe, NOT to the ending single curly quote mark. This is because the symbol for an apostrophe and the ending single curly quote mark is the same character.
  • The safest practice is to check what’s found and click Replace if it matches, NOT Replace All.
  • ALWAYS ALWAYS ALWAYS test this on a copy of the document before you use it on the original document.

So, if you’re using double quotes (straight or curly), or single curly quotes, you can use this Find/Replace. I explain what the settings mean after these steps, if you’re interested. Meantime, here’s my solution, which works in all versions of Word:

  1. If you want to identify the quoted sections with a highlight colour, choose it first. Ignore this step if you want to change the font colour or styling.
  2. Select the text you want to change (e.g. entire document, selected paragraphs, selected columns or rows of a table).
  3. Press Ctrl+H to open the Find and Replace dialog box.
  4. Click the More button.
  5. Select the Use wildcards check box.
  6. Put your cursor into the Find what field—what you do next depends on the type of quote mark used in the document:
    • Straight double quotes: type the quote mark, followed immediately by an asterisk, then another quote mark.
    • Curly quotes (single or double): copy an opening quote mark from the document and paste it into the Find field, then type an asterisk immediately after it, then copy/paste the ending quote mark immediately after the asterisk.
  7. In the Replace with field, type: ^&
  8. Click the Format button.
  9. If you want to apply highlighting to the found text, select Highlight. If you want to apply character formatting (colour, bold, italics, etc.), select Font, select the character styling you want, then click OK.
  10. Your Find and Replace dialog box should look something like this, with the highlighting or character styling choice shown below the Replace with field:
  11. Click Find. Check the text found is what you expect—if so, click Replace, then click Find Next. Avoid clicking Replace All unless you are absolutely certain all quotes have a starting and ending quote mark and that there are no apostrophes within a quote.

What it all means

The quotes in the Find are self-explanatory. The asterisk between them says to find any number of characters (including spaces, punctuation marks, letters, numbers, etc.) between the first quote mark found and the next one found. NOTE: If the find/replace doesn’t match anything, check the type of quote marks you’re using and make sure you copy/paste the opening and closing ones into their correct position in the Find.

The ^& in the Replace says to replace whatever is found with itself (in other words, make no changes to the characters), and the font styling/highlighting below the Replace field tells word to make the replaced text that colour or style.

See also:

[Links last checked April 2021]

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: