Replaces literal text in the main Word story and saves a new DOCX.
Inputs and outputs
document— Word document (text, filesystem.file).search— Find text (text).matchCase— Match case (boolean).text— Replacement text (text).destinationFolder— Destination folder (text, filesystem.folder).name— Output filename (text).fire— Optional start signal (fire).
file— File (text, filesystem.file).matches— Matches (number).fire— Continuation after success (fire).
Settings
search(text). Default empty.matchCase(checkbox). Defaulttrue.text(text). Default empty.name(text). Default empty.
A connected value takes precedence over its saved setting. Invalid values stop the workflow.
Enter 1 to 200 characters of search text on one line. Match case defaults to true. Replacement text defaults to empty and supports up to 8,192 characters on a single line. The block replaces up to 100 literal matches in the main body. If nothing matches, it creates a copy and reports zero.
Requirements and errors
Use installed Microsoft Word Desktop and Windows PowerShell 5.1 in a Windows desktop session. Reconnect a local DOCX of up to 32 MiB without a password, external links, macros, active objects or unsupported dynamic fields.
Choose a fresh DOCX filename and writable local output folder on an NTFS or equivalent volume. Editing requires a document copy without pending tracked changes or editing restrictions.
A failure returns no output resource or continuation signal.
