Skip to content

About

🎯 Easy-to-use tool for text replacements across multiple Word documents at the same time. Handles hyperlinks, text boxes, headers, footers safely. Previews changes with diff context and processes multiple files at once. Real-time match counter shows results as you type. Perfect for bulk document updates. Download exe, no installation needed!

Topics

Resources

Stars

32 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bulk Text Replacement for Word

🎯 Easy-to-use tool for text replacements across multiple Word documents at the same time. Handles hyperlinks, text boxes, headers, footers safely. Previews changes with diff context and processes multiple files at once. Real-time match counter shows results as you type. Perfect for bulk document updates. Download exe, no installation needed! Made for efficiency.⚑

πŸš€ Quick start

Option 1: Download executable

  1. Go to exe and download WordTextReplacer.exe.
  2. Double-click to run. No installation required!
  3. Add your Word documents and start replacing text.

Option 2: Download executable and add it to your context menu (recommended for the fastest approach)

  1. Go to exe and download WordTextReplacer.exe.
  2. Save it to your preferred path. no installation required!
  3. Go to c_m_e and download add_word_text_replacer_to_your_context_menu.reg.
  4. Adapt the .reg file by inserting the path where you saved WordTextReplacer.exe (step 2) in line 8 and 15. (Optional: Edit the icon in line 4 & 11 and the text of the context menu line 5 & 12.)
  5. Run the .reg file and confirm that you want to add it to registry editor. Afterwards, you can delete the .reg file. This is a one-time effort only.
  6. Right-click on any .doc/.docx/.docm file and click on your context menu entry to run the script. (Optional: Add more files in which you want to run the search and replace workflow.)
  7. Start replacing text.

Option 3: You're a developer? Use the code and have fun!

It's just one Python file β€” download it from src and play around with it. :)

✨ Features and best practices

Feature Standard Replace Advanced Replace
Speed ⚑ Very fast πŸ”§ Comprehensive
Main content βœ… Paragraphs & tables βœ… Paragraphs & tables
Text boxes ❌ βœ… All types
Headers & footers ❌ βœ…
Footnotes & endnotes ❌ βœ…
Form fields ❌ βœ…
Formatting preserved? βœ… βœ…
Hyperlinks ⚠️ Replaces text, but removes link. βœ… Replaces text and preserves links.
Regex support βœ… Python regex syntax ❌ (Word's native engine)
Whole word match βœ… βœ…
Case sensitive βœ… βœ…

When to use Standard Replace

Large batch operations (100+ files)/Simple text in paragraphs and tables/No hyperlinks in replacement text/Speed is important/Regex patterns needed

  • Remember: If your file has "special content" (text boxes, headers, footers, footnotes, endnotes, form fields, and hyperlinks), but you are not going to replace any of this text, you can still use the very fast Standard Replace. It won't break any of your "special content".

When to use Advanced Replace

If you are going to replace "special content", use Advanced Replace as it will work for both standard content, such as paragraphs and tables, and "special content". It is just slower than the Standard Replace as it uses Word COM automation instead of python-docx.

Why does the tool offer Standard Replace if Advanced Replace covers everything?

Sometimes you just want to replace a text snippet which is not present in any "special content" and you want to do that as fast as possible. Therefore, I added the very fast Standard Replace (which will maintain formatting, don't worry!).

Additional features

  • πŸ“Š Real-time match counter: See match count update live as you type β€” no need to run a preview first.
  • πŸ‘€ Preview with diff context: See what will be changed, including surrounding text context for each match.
  • πŸ”— Hyperlink check: Analyze documents for hyperlinks before deciding which replace method to use.
  • πŸ”€ Whole word match: Option to match whole words only.
  • πŸ”£ Regex support: Full Python regex support for Standard Replace/Preview.
  • πŸ“ Non-breaking space support: Use _nbsp_ or Shift+Space.
  • πŸ” Invisible character handling: Automatically strips soft hyphens and zero-width characters that Word inserts β€” so your searches always match what you see.
  • πŸ“ Batch processing: Handle multiple documents at once, including whole folder trees via "Add folder".
  • πŸ’Ύ Backup creation: Optional, per-file backups that are never overwritten by later runs.
  • ↩️ Restore backups: Roll selected files back to their backed-up state with one click.
  • ⌨️ Keyboard shortcuts: Efficient workflow.

The tool

πŸ“Έ Screenshot

grafik

▢️ YouTube

This video, with a slightly outdated UI, shows the tool in action.

If you don't want to hear me talking for too long, just jump to 3:30.

🎯 Use cases (examples)

  • Legal documents: Update contract terms across multiple files.
  • Technical documentation: Replace product names or versions.
  • Marketing materials: Update company information or branding.
  • Academic papers: Standardize terminology or citations.
  • Corporate communications: Update contact information or policies.

⌨️ Keyboard shortcuts (excerpt)

Shortcut Action
F5 Preview changes
Ctrl+Enter Standard Replace
Ctrl+Shift+Enter Standard Replace and automatically close the application afterwards
Shift+Enter Advanced Replace
Ctrl+O Add more files
Shift+Space Insert non-breaking space
Ctrl+1/2 Focus search/replace boxes
Tab Switch between search & replace boxes
Delete Remove selected files (when file list is focused)

πŸ“‹ System requirements

  • OS: Windows 7/8/10/11
  • Software: Microsoft Word (for Advanced Replace features)
  • Installation: None required for executable version

Project structure

WordTextReplacer/
β”œβ”€β”€ _legacy/                   # legacy version (v1.1)
β”œβ”€β”€ c_m_e/                     # .reg file
β”œβ”€β”€ doc/                       # User Manual
β”œβ”€β”€ exe/                       # .exe file
└── src/                       # Source Code (single .py file)

🀝 Contributing

Contributions are welcome! I am not an experienced developer. If you have ideas/upgrades/improvements, I am happy to see your code!

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes.
  4. Submit a pull request.

πŸ“„ License

Licensed under a Source-Available License (Apache 2.0 + No Selling clause). – See LICENSE for details.

🫢 Support

The tool is free and I am happy with sharing it with whoever wants to use it. If you want, you can buy me a coffee. β˜•πŸ™ And connect with me!

πŸ† Acknowledgments

  • Built with Python and tkinter for the GUI.
  • Word COM automation (pywin32) for advanced document operations.
  • python-docx for fast document processing.
  • I used AI to create this tool. :)

β¬›πŸŸ¦β¬› Forza Inter! β¬›πŸŸ¦β¬›

Made with enthusiasm for efficient document processing.

About

🎯 Easy-to-use tool for text replacements across multiple Word documents at the same time. Handles hyperlinks, text boxes, headers, footers safely. Previews changes with diff context and processes multiple files at once. Real-time match counter shows results as you type. Perfect for bulk document updates. Download exe, no installation needed!

Topics

Resources

Stars

32 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages