insert_header_near_text
Add headers in Word documents by specifying text, paragraph index, or position. Customize header style and place it before or after the target paragraph for precise document formatting.
Instructions
Insert a header (with specified style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), header_title (str), position ('before' or 'after'), header_style (str, default 'Heading 1'), target_paragraph_index (int, optional).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filename | Yes | ||
header_style | No | Heading 1 | |
header_title | No | ||
position | No | after | |
target_paragraph_index | No | ||
target_text | No |
Input Schema (JSON Schema)
{
"properties": {
"filename": {
"title": "Filename",
"type": "string"
},
"header_style": {
"default": "Heading 1",
"title": "Header Style",
"type": "string"
},
"header_title": {
"default": null,
"title": "Header Title",
"type": "string"
},
"position": {
"default": "after",
"title": "Position",
"type": "string"
},
"target_paragraph_index": {
"default": null,
"title": "Target Paragraph Index",
"type": "integer"
},
"target_text": {
"default": null,
"title": "Target Text",
"type": "string"
}
},
"required": [
"filename"
],
"type": "object"
}