Find and Replace
Description
The Find and Replace activity searches for text within a Microsoft Word document and replaces matching occurrences with the specified replacement text.
The activity updates the specified Word File in place. The same file reference can be used by subsequent Word activities.
Common Capabilities
Process Data Support
This activity supports dynamic configuration using variables from the Process Data drawer.
You can bind values from Model Data, Form Data, System Data, Enterprise Variables, and Activity Outputs.
Learn more → Using Process Data
Execution Control
Controls how this activity behaves when multiple incoming execution paths converge.
Learn more → Execution Control
On Error
Defines how the workflow behaves if this activity encounters a runtime error.
Design-Time Configuration
Display Text
The label displayed for this activity on the workflow canvas.
Word File
The Word document to modify.
Password
Optional password used to open a password-protected document.
Text To Find
The text to search for within the document.
Text To Replace
The text that replaces each matching occurrence.
Occurrence
Specifies which matching occurrences are replaced.
Available options:
- First
- Last
- All
Default: All
Text Search Options
Page Lookup Mode
Specifies whether the search is limited to particular pages.
Available options:
- All
- Single
- Range
Default: All
Lookup Page By
Available when Page Lookup Mode is Single.
Specifies how the page is identified.
Available options:
- Page Number
- Page Index
Page Number
The printed page number to search.
Available when:
- Page Lookup Mode = Single
- Lookup Page By = Page Number
Page Index
The zero-based page index to search.
Available when:
- Page Lookup Mode = Single
- Lookup Page By = Page Index
From Page Index
The starting zero-based page index.
Available when Page Lookup Mode is Range.
To Page Index
The ending zero-based page index.
Available when Page Lookup Mode is Range.
Search In
Body
Search within the document body.
Default: True
Header
Search within document headers.
Default: False
Footer
Search within document footers.
Default: False
If Body, Header, and Footer are all disabled, the document body is searched automatically.
Search Options
Match Case
Determines whether the search is case-sensitive.
Default: False
Match Whole Words Only
Matches complete words only.
Default: False
Use Regular Expression
Treats the search pattern as a regular expression.
Default: False
Regular Expression
The regular expression pattern used to identify matches.
Available when Use Regular Expression is enabled.
Cross-Platform Considerations
Page-based search and replacement can produce different results on Windows and Linux because page layout calculations depend on the Word rendering engine.
For the most consistent behavior across platforms, avoid page-restricted searches when possible and use content-based matching instead.
Outputs
Result
Summary information describing the replacements performed within the document.
See ReplacementResult.