insert_line_or_paragraph_near_text
Add text before or after specific paragraphs in Word documents by targeting text or paragraph index, with optional style matching.
Instructions
Insert a new line or paragraph (with specified or matched style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), line_text (str), position ('before' or 'after'), line_style (str, optional), target_paragraph_index (int, optional).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| target_text | No | ||
| line_text | No | ||
| position | No | after | |
| line_style | No | ||
| target_paragraph_index | No |