r7_replace
Replace text in DOCX files while preserving all run formatting, fonts, colors, and styles. Specify search and replacement, with options for case sensitivity, output path, and replace all.
Instructions
Search and replace text in DOCX while strictly preserving all existing run formatting, fonts, colors, and styles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | Text substring or pattern to find. | |
| replace | Yes | Replacement text. | |
| filePath | Yes | Path to the DOCX file. | |
| matchCase | No | Case sensitive matching (default true). | |
| outputPath | No | Optional target path. | |
| replaceAll | No | Replace all occurrences (default true). |