Insert Image to Word File
Description
You can insert an image to a Word DOCX file at a certain position indicated by a placeholder.
Input Arguments
Input Argument | Type | Description | Required? | Advanced Option? | Default |
---|---|---|---|---|---|
Existing File Content | Dynamic Content | The Word document which shall be used to insert image into it. Must be a file – Base64 string is not supported. | ✔️ | ❌ | - |
Image | Image file | The image which shall be inserted to a Word document. | ✔️ | ❌ | - |
Placeholder name | String | The text between prefix and suffix where to insert the image, e.g. {{InsertHere}} . | ❌ | ❌ | - |
Maximum Image Width | Number | Maximum width in pixels, capped at 800 (page width). | ❌ | ✔️ | Original width |
Maximum Image Heigh t | Number | Maximum height in pixels, capped at 2400 (page height). | ❌ | ✔️ | Original height |
Placeholder Prefix | String | Opening placeholder delimiter e.g. {{InsertHere}} . | ❌ | ✔️ | '{{' |
Placeholder Suffix | String | Closing placeholder delimiter e.g. {{InsertHere}} . | ❌ | ✔️ | '}}' |
Output
Response | Type | Description |
---|---|---|
File response | File | The updated Word file (docx) with the inserted image. |
File response as string | String | The updated Word file as a base64-encoded string. Useful for storing in variables, Dataverse, or passing to other actions. |
MIME type | String | The MIME type of the file, typically application/vnd.openxmlformats-officedocument.wordprocessingml.document. |
Extension | String | The file extension, e.g., docx. |
Power Automate Examples
Insert Image to Word File
We use one Get file content-action to retrieve an existing Word document and another one to retrieve an existing image. In the Word document we included an text about a giraffe and the placeholder code: "##image##". At the position of the placeholder code, the image will be inserted. Thereafter, the Word is being saved.
💡
Looking for the response to this example? Scroll up to see the Output tab.
Known Limitations
⚠️
If you experienced other limitations please get in touch with us!