format_text
Apply bold, italic, underline, color, and other character formatting to specific text or paragraphs in Word documents, helping you style selected ranges without manual edits.
Instructions
Apply character formatting to a text range. formatting keys: bold, italic, underline, strike, font, size_pt, color, highlight, superscript, subscript, small_caps, all_caps, hidden, double_strike, char_spacing_pt, kerning_pt, position_pt, language, east_asian_language (BCP-47; ko/ja/zh go in east_asian_language, Word's East-Asian proofing slot; live maps tags to LCIDs, unmapped tags are file-mode only). Target: paragraph_index + find (substring), find alone (occurrence picks the match), or the whole paragraph. For a named character style use apply_character_style. Auto-backup in file mode: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Documents open in Word are edited live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | ||
| live | No | auto | |
| backup | No | ||
| file_path | Yes | ||
| formatting | Yes | ||
| occurrence | No | ||
| paragraph_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||