How to Replace Text in Multiple Word Documents at Once
Question details
The user needs to find and replace specific text (such as changing case from "APPLE" to "Apple") across a large number of Word documents stored in multiple folders, without manually opening and editing each file.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Updating a specific term, name, or formatting convention across a large batch of existing documents simultaneously.
- Observed behavior
- The user requires an automated batch processing method to execute a bulk Find and Replace operation across 150+ closed documents efficiently.
Before running any automated batch replacement processes, copy all target documents into a separate, dedicated folder. This ensures you have an untouched backup in case the macro or add-in alters text incorrectly.
Use a VBA Macro for Batch Processing
Create a built-in script to loop through folders, open documents, replace text, and save automatically without third-party software.
Using a Visual Basic for Applications (VBA) macro allows you to automate the process seamlessly. A standard batch-replace script will loop through a specified directory, execute the find and replace command with your specific parameters, and save the files.
Open a blank Word document and press Alt + F11 to launch the VBA Editor.
In the top menu, click 'Insert' and select 'Module' to open a blank coding window.
Paste a trusted batch Find and Replace macro script (commonly available on Microsoft MVP forums) into the module window. Ensure the script includes an 'Update' procedure to process all files in a folder.
Modify the code to include your target folder path. Update the replacement terms (e.g., finding 'APPLE' and replacing it with 'Apple'). Set both 'MatchCase' and 'MatchWholeWord' to True in the script.
Press F5 or click the 'Run' button on the toolbar to execute the macro. Word will automatically process, save, and close each document in the specified folder.

Install a Trusted Word Add-In
Use a dedicated third-party add-in with a user interface if you prefer not to work with VBA code.
Discover WPS Office for Seamless Document Editing
If you are processing multiple documents and looking for a streamlined, highly compatible suite, WPS Office is an exceptional choice. It provides a lightweight, intuitive environment that handles complex document formatting with ease.

Frequently Asked Questions
Can I batch replace text without using macros?
Yes, you can avoid macros by installing reliable third-party Word add-ins. These tools integrate directly into Word and provide a user-friendly menu to select folders and define your Find and Replace criteria.
Will a batch replace macro alter my document formatting?
A standard text replacement macro will retain your existing formatting unless you specifically code the VBA script to apply new styles, fonts, or colors to the replaced text.
How do I ensure the replacement is case-sensitive?
If you are using a VBA macro, ensure the 'MatchCase' property is set to 'True' in the code. If you are using a batch-processing add-in, simply check the 'Match case' option in the user interface before running the task.
Can I process Word files located in subfolders as well?
Yes, but your method must support it. If writing a VBA macro, you must include a recursive function to loop through subdirectories. If using an add-in, look for and enable the 'Include subfolders' option.




