Delete Paragraphs
delete_paragraphsDelete body paragraphs from Word .docx files by index or range. Safeguards prevent cutting fields or section breaks, with tracked deletions and backups supported.
Instructions
Delete body paragraphs by 0-based inclusive index (start, end; end defaults to start) or by range={start, end} location objects. Refuses ranges cutting a field or a section break; deleting every paragraph leaves one empty one behind. track records tracked deletions. expect_start/expect_end delete nothing unless that index still holds the given text. Auto-backup in file mode (backup=False skips rotation). Open documents edit live (serialized), unsaved until saved. For batches, use apply_edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| live | No | auto: file or live; force: live; off: refuse | auto |
| range | No | ||
| start | No | ||
| track | No | ||
| author | No | Claude | |
| backup | No | ||
| file_path | Yes | ||
| expect_end | No | ||
| expect_start | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||