fill_form_fields
Fill Word form fields by name or tag: set text, checkbox, and dropdown values. Handles missing keys by error or skip, with automatic backup.
Instructions
Set form-field values by name (legacy fields) or tag/alias (content controls): text fields take strings, checkboxes booleans, dropdowns only values from their options (refused otherwise). Duplicate field names are refused with locations. missing: 'error' refuses, changing nothing, if a key matches no field; 'skip' ignores and reports them. For SDT types this tool skips, use set_content_control_value. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup | No | ||
| values | Yes | ||
| missing | No | error | |
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||