r7_docx_hyperlink
Read DOCX hyperlink text and target URLs, insert new links with deduplicated relationships, update link text, or remove links while keeping formatting.
Instructions
Read, insert, re-text or remove DOCX hyperlinks. Reading returns each link's text and target URL; inserting writes the relationship (external, deduplicated by URL) and a Word-compatible Hyperlink-styled run; re-texting keeps the relationship and the run formatting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Target URL for insert. | |
| bold | No | ||
| size | No | Font size in points for the link text. | |
| text | No | Link text (insert) or its replacement (setText). | |
| color | No | Font colour for the link text, e.g. "#0563C1". | |
| index | No | Hyperlink index from action "list", for setText/remove. | |
| style | No | Character style id for the link (default Hyperlink). | |
| action | No | list (default), insert, setText or remove. | |
| anchor | No | Internal bookmark/anchor name instead of a URL. | |
| italic | No | ||
| tooltip | No | Tooltip shown on hover. | |
| filePath | Yes | Path to the DOCX file. | |
| alignment | No | Alignment of the new paragraph. | |
| outputPath | No | Write to a copy instead of editing in place. | |
| newParagraph | No | For insert: put the link in its own paragraph. | |
| paragraphIndex | No | Paragraph the link joins (insert) or whose first link to edit/remove. |