Search K
Appearance
Appearance
Performs a selected operation on a Microsoft Word document, such as inserting or replacing content, manipulating tables, managing images, or extracting text.
Use this task to automate modifications to Word documents during a workflow. The operation to perform is controlled by the Action selector, and additional inputs become visible based on the selected action. This task supports a broad range of document manipulation scenarios, from simple text replacement to bulk table population and image management.
| Field | Type | Required | Description |
|---|---|---|---|
| Action | Dropdown | Yes | The Word operation to perform. |
| Document Path | Text | Yes | Full path to the target Word document on the server. |
| Insert Text | Multi-line Text | No | Text to insert as a new paragraph. Visible when Action is InsertParagraph. |
| Insertion Marker | Text | No | Location marker for insertion (e.g. AtEnd, BeforeBookmark:Name, Paragraph:5). Visible when Action is InsertParagraph, InsertImage, or CreateTable. |
| Replacement Patterns | Key-Value Pairs | No | Dictionary of search patterns (keys) and replacement text (values). Visible when Action is ReplaceText. |
| Use Regex | Checkbox | No | Treat search patterns as regular expressions. Visible when Action is ReplaceText or FindAndHighlightText. |
| Search Pattern | Text | No | Text or regex pattern to find. Visible when Action is FindAndHighlightText. |
| Highlight Color | Text | No | Color to apply to matched text (e.g. yellow, green). Visible when Action is FindAndHighlightText. |
| Target Paragraph Identifier | Text | No | Paragraph number or bookmark name to delete. Visible when Action is DeleteParagraph. |
| Image Path | Text | No | Local path or URL to the image file. Visible when Action is InsertImage or ReplaceImage. |
| Target Image Identifier | Text | No | Image filename, alt text, or index to replace or delete. Visible when Action is ReplaceImage or DeleteImage. |
| Image Width | Text | No | Desired image width. Visible when Action is InsertImage or ReplaceImage. |
| Image Height | Text | No | Desired image height. Visible when Action is InsertImage or ReplaceImage. |
| Number of Rows | Text | No | Number of rows for the table. Visible when Action is CreateTable or BulkPopulateTable. |
| Number of Columns | Text | No | Number of columns for the table. Visible when Action is CreateTable or BulkPopulateTable. |
| Table Identifier | Text | No | Table index or bookmark name. Visible when Action is AddTableRow, DeleteTableRow, or BulkPopulateTable. |
| Row Values (Comma-Separated) | Multi-line Text | No | Comma-separated values for the new row. Visible when Action is AddTableRow. |
| Row Index | Text | No | Zero-based index of the row to delete. Visible when Action is DeleteTableRow. |
| Table Data (JSON) | Multi-line Text | No | JSON array of arrays representing table rows and columns. Visible when Action is BulkPopulateTable. |
| PDF Output Path | Text | No | File path where the exported PDF will be saved. Visible when Action is SaveAsPDF. |
| Extract Range Marker | Text | No | Range to extract (e.g. All, Bookmark:Name, Paragraph:5-10). Visible when Action is ExtractText. |
All inputs except Action and Document Path are conditional. Each input is shown only when the relevant Action value is selected, as indicated in the Description column above.
| Operation | Description |
|---|---|
| InsertParagraph | Inserts a new paragraph at the specified marker location. |
| ReplaceText | Replaces text throughout the document using a dictionary of find-and-replace pairs. |
| DeleteParagraph | Removes the paragraph identified by number or bookmark. |
| InsertImage | Inserts an image at the specified marker location. |
| ReplaceImage | Replaces an existing image identified by name, alt text, or index. |
| DeleteImage | Deletes an image identified by name, alt text, or index. |
| CreateTable | Creates a new table with the specified dimensions at the marker location. |
| AddTableRow | Appends a row of comma-separated values to the specified table. |
| DeleteTableRow | Deletes the row at the specified zero-based index from the specified table. |
| BulkPopulateTable | Populates a table with a 2D JSON array of row and cell values. |
| ExtractText | Extracts text from the specified range and returns it as the Result output. |
| FindAndHighlightText | Highlights all matches of a search pattern with the specified color. |
| Name | Description |
|---|---|
| Result | The result of the operation. Returns OK for most actions, extracted text for ExtractText, or the output file path for SaveAsPDF. |