logo
search
Document Editing Problems

How to Replace Every Word in Word While Preserving Capitalization

Ayan MasoodAyan Masood Sep 28, 2026 869 views

Question details

The user wants to replace all words in a document with a specific new word, but needs to maintain the original capitalization patterns (such as lowercase, uppercase, or title case).

How to Replace Every Word in Word While Preserving Capitalization
Product
Microsoft Word
Device & OS
not provided
Scenario
Performing a bulk text replacement in a document without losing the distinct text case formatting of the original words.
Observed behavior
Standard find and replace tools overwrite words exactly as typed in the replacement field, requiring a workaround to preserve the original capitalization state.
Before you start

Before running a bulk replacement with wildcards or a macro, turn on 'Show/Hide Formatting Marks' to better see word boundaries, and ensure you are positioned at the beginning of the document.

Solution 1Recommended

Use Advanced Find and Replace with Wildcards

Utilize Word's wildcard functionality to target lowercase and capitalized words separately, replacing them with the appropriately cased target word.

This method involves running the Find and Replace operation multiple times to target different capitalization patterns. The wildcards allow Word to differentiate between words that start with a lowercase letter versus those that start with an uppercase letter.

1
Open Find and Replace

Press Ctrl+H on your keyboard to open the Find and Replace dialog box.

2
Enable Wildcards

Click the 'More' button to expand the search options, and check the box next to 'Use wildcards'.

3
Replace Lowercase Words

In the 'Find what' box, type <[a-z]*>. In the 'Replace with' box, type your replacement word in lowercase (e.g., sun). Click 'Replace All'.

4
Replace Capitalized Words

Clear the 'Find what' box and type <[A-Z]*>. In the 'Replace with' box, type your replacement word with a capital letter (e.g., Sun). Click 'Replace All'.

Use Advanced Find and Replace with Wildcards
Pattern matching tip: The '<' symbol indicates the beginning of a word, while '>' indicates the end. Using '[a-z]' targets lowercase starting letters, and '[A-Z]' targets uppercase starting letters.

Perform Advanced Text Replacements with WPS Writer

WPS Writer provides a powerful Find and Replace tool equipped with wildcard support, enabling you to execute precise text edits and formatting adjustments just as easily as in Microsoft Word.

  1. 1. Launch the Find and Replace Tool: Open your document in WPS Writer and press Ctrl+H to access the Replace menu.
  2. 2. Access Advanced Options: Click the 'Advanced' button in the dialog box to reveal extended search parameters, then check 'Use wildcards'.
  3. 3. Execute the Replacement: Input your wildcard patterns (such as <[a-z]*>) and your appropriately cased replacement text, then click 'Replace All'.
Advanced Find and Replace functionality with full wildcard supportFully compatible with Microsoft Word formats (.docx, .doc)Free, lightweight, and features a familiar tabbed user interface
microsoft office alternative - wps office

Frequently Asked Questions

Does the standard 'Match case' option preserve capitalization during replacement?

No, checking 'Match case' only forces Word to find text that exactly matches the case you typed in the search box. It does not dynamically adapt the replacement text to match the original word's capitalization.

Can I easily undo a 'Replace All' action if I mess up my document formatting?

Yes, 'Replace All' counts as a single action in your document's history. You can revert all the replacements instantly by pressing Ctrl+Z immediately after executing the command.

Why didn't my wildcard search replace words that are entirely uppercase?

If you used the <[A-Z]*> wildcard, it targets words starting with an uppercase letter, which includes both Title Case and ALL CAPS. To target only words that are entirely uppercase, you would need a more specific wildcard expression or to run a VBA macro that checks the case of the entire string.