find_formatted
Find text in Word documents by its effective formatting—bold, italic, font, size, color, highlight, or style—with optional case-sensitive query. Returns matches and the source level for each format criterion.
Instructions
Find text by its EFFECTIVE formatting: bold/italic/underline/strike (true/false), font, size_pt, color (hex), highlight, style (id or name); all criteria must hold together. Resolution follows Word (run properties, then character style, then paragraph-style chain, then document defaults); every match reports which level satisfied each criterion, so explicit and Heading-inherited bold are distinguishable. query=None returns every stretch with the formatting; a query (case-sensitive) returns only occurrences inside such stretches. scope: 'body' (tables included) or 'all' (adds footnotes/endnotes). Text-box content is EXCLUDED: read boxes via get_textbox_text or get_text include_textboxes. Theme references are counted, never guessed. replace_formatted is the mutation twin. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| scope | No | body | |
| file_path | Yes | ||
| formatting | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||