Format text
Apply bold, italic, underline, strikethrough, highlight, font, size or colour to occurrences of a text in the document, a paragraph range, a bookmark or a page; inputs left empty are not changed.
Command in the Word toolkit · id ooa.word/format_text · 17 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Text to format wherever it appears. | |
| Bold | Boolean | No | Bold on or off. | |
| Italic | Boolean | No | Italic on or off. | |
| Underline | Boolean | No | Single underline on or off. | |
| Size | Number | No | Font size in points. | |
| Color | String | No | Hex text colour. | |
| Font | String | No | Font name, e.g. Calibri. | |
| 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. |
| Highlight | String | No | Highlighter colour behind the text, or none to remove it. | |
| Strikethrough | Boolean | No | Strikethrough on or off. | |
| 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 format text on this 1-based page of the body. | |
| Bookmark | String | No | Only format text in the paragraphs a bookmark covers. |
Outputs
| Output | Type | What it is |
|---|---|---|
| count | Number | Number of occurrences formatted. |