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


Working on Shared Templates

In many companies it is common to have standard templates accessible through the internal network. If you have templates ...

Discover More

Detailed Measurements

Want to know exactly how far something on the ruler is from the left and right margins of your document? It's easy to ...

Discover More

Defining and Using Custom Colors

Want to spice up your worksheets with your own custom colors? Here's how to define them easily.

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Understanding Pattern Matching

Pattern matching is a type of searching you can do in Word that is very powerful. Despite its power, it remains rather ...

Discover More

Adding an Ellipsis to the Beginning of Some Paragraphs

The Find and Replace feature of Word is very powerful. You can even use it to add a unique character to the beginning of ...

Discover More

Replacing Two Tabs with a Space in Limited Situations

The Find and Replace feature of Word is very powerful, allowing you to finely target exactly what you want to search. ...

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}] 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 minus 0?

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.

Newest Tips

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.