Idempotent Powershell word search/replace across documents with headers, change tracking, etc
- by user61633
I've found one or two guides to doing a word search and replace across multiple documents with powershell. They work well on simple documents. However, the script ignores text in headers and footers; and if "track changes" is enabled, it replaces text which has already been replaced, resulting in multiple copies of the new text if I run the script more than once on the same file.
Any clues as to how I can avoid these undesirable behaviors and make this script robust?