Find and replace text
Find text everywhere (body, tables, headers, footers) or in a paragraph range, bookmark or page and count it, or replace it, e.g. fill {{customer}} placeholders; can ignore case, match whole words or take only the first or last occurrence.
Command in the Word toolkit · id ooa.word/replace_text · 11 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Find | String | Yes | Text to find. | |
| Replace with | String | No | Replacement text; empty removes what is found. | |
| Session | String | No | word | Session name. |
| Match case | Boolean | No | true | Match upper/lower case exactly. |
| Whole word | Boolean | No | false | Only match the text as a whole word, not inside a longer word. |
| Occurrence | String | No | all | Which occurrences to change, in document order: all, the first or the last. |
| From paragraph | Number | No | 1-based first body paragraph to search; the whole document (with tables, headers and footers) when both are empty. | |
| To paragraph | Number | No | 1-based last body paragraph to search, included; to the end when empty. | |
| Page | Number | No | Only look on this 1-based page of the body (from Word's saved page layout, else the stored page breaks). | |
| Replace | Boolean | No | true | Replace what is found with the replacement text (empty removes it); when off the step only counts the matches and changes nothing (the default for new steps). |
| Bookmark | String | No | Only look in the paragraphs a bookmark covers. |
Outputs
| Output | Type | What it is |
|---|---|---|
| count | Number | Number of matches found, or of replacements made. |