开发者

Idempotent Powershell word search/replace across documents with headers, change tracking, etc

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 multipl开发者_Python百科e 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?

(reposted from Serverfault).


For replacing text in all parts of a Word document see:

Using a macro to replace text where ever it appears in a document

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜