Replacing Text and Capitalizing a Letter in One Step

by Allen Wyatt
(last updated September 2, 2019)


Joe has a document in which he wants to use Find and Replace. He needs to replace all instances of the word "paragraph" with a paragraph mark, which he knows how to do. However, he also wants to delete the space after the word "paragraph" (also easy) and then capitalize the letter after the space. He wonders if there is a way to do this using Find and Replace in a single pass.

You actually can perform this task using a single pass of your document with Find and Replace. The trick is in effectively using the wildcard search capabilities provided by Word. Follow these steps:

  1. Press Ctrl+H to display the Replace tab of the Find and Replace dialog box.
  2. Click the More button, if it is visible. (See Figure 1.)
  3. Figure 1. The expanded Find and Replace dialog box.

  4. Make sure the Use Wildcards check box is selected.
  5. In the Find What box, enter "[pP]aragraph^32([a-zA-Z])" (without the quote marks).
  6. In the Replace With box, enter "^p\1" (again, without the quote marks).
  7. With the insertion point still in the Replace With box, click the Format button and then choose Font. Word displays the Find Font dialog box. (See Figure 2.)
  8. Figure 2. The Find Font dialog box.

  9. Make sure that the All Caps check box has a check mark in it. (Click the check box however many times is necessary until you see a check mark.)
  10. Click OK to close the Find Font dialog box.
  11. Click on Replace All.
  12. Close the Find and Replace dialog box.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1858) applies to Microsoft Word 2007, 2010, and 2013.

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. ...


Finding Fields

Fields allow you to add simple dynamic content to your document. Here's how you can find the fields when you need to know ...

Discover More

Extracting Street Numbers from an Address

Want to know how to move pieces of information contained in one cell into individual cells? This option exists in using ...

Discover More

Automatic Row Height For Merged Cells with Text Wrap

When you have text wrap turned on in a cell, Excel expands the height of the row as you add more text to the cell. When ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Searching for Characters

When using pattern matching in a search, you can specify individual characters or ranges of characters you want matched ...

Discover More

Matching At the Beginning or End of a Word

The pattern matching capabilities of Word's search engine are quite powerful. You can tailor your search pattern so that ...

Discover More

Replacing and Formatting at the Same Time

The Find and Replace feature in Word is very powerful. So powerful, in fact, that you can change the formatting on ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


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 four more than 1?

2015-09-29 08:54:49

Ken Endacott

Here are some references on using wildcards.

Someone else's command strings often don't do exactly what you want. With an understanding of wildcards you can modify them to suit your exact needs. For example the word paragraph might be legitimately embedded in the text but when intended as a flag it is followed by several spaces. The following will detect if the word has two or more following spaces.


The command {2,} will search for two or more of the preceding character. Similarly, {2,4} will find only two, three or four spaces.

2015-09-28 10:58:24

Jennifer Thomas

@Ken Endacott - that is a very nice explanation of wildcards and using expressions - kudos!

2015-09-28 06:56:11

Ken Endacott

You probably haven't ticked Use Wildcards.

The Find string is essentially a list of instructions telling what to search for.
[pP] is one character either p or P. With wildcards Find is case sensitive so you need to specify both.
Then follows characters to spell out the rest of the word paragraph or Paragraph.

^32 is the ASCII value of a space character. You can use an actual space but it can be difficult to see how many spaces there are or even if a space is present.

[a-zA-Z] is one character in the range a to z or A to Z.

The round brackets create a group which in this instance is a single alphabetic character.

The replace dialog consists of ^p which is a paragraph mark followed by 1 which gives the result of grouping 1 (if there are several groupings they are 1 2 etc.)
All Caps is applied to the replace so that the alphabetic character will be replaced by the same character in upper case.

In summary, Find will search for the word paragraph or Paragraph followed by one space followed by an alphabetic character. Replace replaces what is found by a paragraph mark and the alphabetic character in upper case, in the process deleting the word paragraph.

Your suggestion is a worthwhile refinement that would also delete a leading space. Otherwise the space will end up preceding the paragraph mark.

2015-09-28 03:36:26


You'll have to explain that a bit more. I recognise 32 as space (with a delimiter ^) and ([a-zA-Z]) as any letter, and ^p as the paragraph mark, but what about the rest?

2015-09-28 03:02:35


I don't know why, but it is not working in my work. I use MS Word 2007

2015-09-27 09:21:01

Harold Druss

Include the space before the word paragraph in the find dialog.


Include a period in the replace dialog.


This Site

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.


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.