Replace Image Activity
The Replace Image activity enables users to substitute a specific image within an open Word document with a new, desired image. This activity streamlines document updates by programmatically altering visual content without manual intervention.
| Field | Description | Requirement |
|---|---|---|
| Word Name | The reference name of the Word file that has already been opened or created. | Required |
| Source Image Path | The full folder path to the new image file that will replace the existing one. | Required |
| Image Height | The desired height of the new image in pixels. Default value is 450 pixels. | Optional |
| Image Width | The desired width of the new image in pixels. Default value is 450 pixels. | Optional |
| Image Alt Text | The alternative text (alt text) of the image to be replaced within the Word document. | Optional |
| Image Index | The sequential order (index) of the image to be replaced in the Word document. | Optional |
Action Types & Examples
Word Document Reference
- Format:
string - Example Result:
newWord
Source Image Path
- Format:
string - Example Result:
C:\Temp\picture.jpeg
Implementation Examples
Field Setup - Word Name: ${newWord} - Source Image Path: C:\Temp\picture.jpeg
Execution Parameters - Image Alt Text: "Old Company Logo" - Image Index: 1 - Image Height: 300 - Image Width: 400
Technical Notes
The activity identifies the target image for replacement either by its alternative text or its sequential index within the document. If both
Image Alt TextandImage Indexare provided, the activity typically prioritizes the index. Ensure the specifiedSource Image Pathis accessible to the RPA bot. Supported image formats commonly include JPEG, PNG, and BMP.