Replace Picture
Description
The Replace Picture activity replaces one or more pictures within a Microsoft Word document by matching their alt text.
The activity updates the specified Word File in place. The same file reference can be used by subsequent Word activities.
Common settings
Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.
Design-Time Configuration
Display Text
The label displayed for this activity on the workflow canvas.
Word File
The Word document to modify.
Password
Optional password used to open a password-protected document.
Alt Text
The alt text used to identify pictures to replace.
All pictures whose alt text matches the specified value are replaced.
Picture
Select Picture By
Specifies how the replacement picture is provided.
Available options:
- File
- URL
- Base64
Default: File
Picture File
A file reference to the replacement image.
Required when Select Picture By is File.
Picture URL
The public HTTP or HTTPS URL of the replacement image.
Required when Select Picture By is URL.
Picture Base64
The image content encoded as Base64.
Both raw Base64 content and data URI formats are supported.
Required when Select Picture By is Base64.
Common image formats such as PNG, JPG, JPEG, GIF, and BMP are supported.
Format support can vary depending on the operating system and Word rendering engine.
Picture Options
Width (Centimeters)
Optional width to apply to the replacement picture.
Height (Centimeters)
Optional height to apply to the replacement picture.
Cross-Platform Considerations
Image rendering and format support can vary between Windows and Linux depending on the underlying image processing libraries.
For the most consistent results across platforms, use PNG or JPG images.
Outputs
Document Ranges
A collection of document ranges where pictures were replaced.
See DocRange.
Example: Replace a logo
In the template document, assign the logo picture the alt text CompanyLogo. Configure Alt Text with the same value and select the replacement Picture File, public URL, or Base64 source.
Set width and height only when the output requires explicit dimensions; supply dimensions with the intended aspect ratio. All pictures matching the alt text are replaced. Inspect Document Ranges and the resulting document to verify the intended images changed.