set_paragraph_format
Set alignment, spacing, indents, and outline levels on selected Word paragraphs. Use outline_level to add template headings to navigation and TOC without altering their visual formatting.
Instructions
Set paragraph formatting on a batch of paragraphs (0-based indices). Keys: alignment, space_before_pt, space_after_pt, line_spacing, indent_left_pt, indent_right_pt, first_line_indent_pt, keep_with_next, outline_level. outline_level (0-8, 0 = top; null removes the override) sets w:outlineLvl without touching style or visual formatting: the way to give template headings (Normal-styled, direct-formatted) a place in Word's navigation pane and TOC harvesting, where apply_style would change their look. get_paragraph_format is the matching reader. Documents open in Word are edited live (shading, borders, and tab_stops are refused live; all other keys work). Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | auto | |
| backup | No | ||
| indices | Yes | ||
| file_path | Yes | ||
| formatting | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||