r7_edit
Edit or delete a specific paragraph in a DOCX document, preserving its section breaks, list numbering, and character formatting.
Instructions
Edit, update text, style, or remove a specific paragraph in a DOCX document. The paragraph keeps its own properties (section break, list numbering, spacing) and the new text inherits the previous first run's formatting unless you ask for different formatting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Paragraph style name (e.g. Normal, Heading1, Heading2). | |
| newText | No | New text content for the paragraph. | |
| filePath | Yes | Path to the DOCX document. | |
| formatting | No | Character formatting for the new text: { bold, italic, underline, strike, family, size, color, highlight }. | |
| outputPath | No | Optional target path (defaults to overwriting in-place). | |
| paragraphIndex | Yes | 0-based index of the target paragraph (from r7_inspect/r7_read). | |
| deleteParagraph | No | Set true to delete this paragraph. | |
| preserveFormatting | No | Keep the paragraph's existing character formatting on the new text (default true). |