apply_style
Apply a named style to specified text ranges or matching patterns in Word documents, with optional auto-backup and atomic saves.
Instructions
Apply a named style. range={start,end} (locations or bare indices) applies a paragraph style to those paragraphs, changing their full look (Heading1-9 auto-created); target={search:{text, occurrence?}} applies a character style to the matched text instead. For an outline level without visual change use set_paragraph_format. Auto-backup (backup=False skips rotation); atomic validated save. Refuses documents open in Word. For batches, use apply_edits. Defining new named styles lives in the academic pack.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | ||
| style | Yes | ||
| backup | No | ||
| target | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||