Find and replace picture action
- Updated: 2025/10/14
Use the Find and replace picture action to find a picture in a Word document based on the title or alt text and optionally replace it with another picture. This action supports targeted search within specific ranges and allows customization of size and occurrence of the replacement image.
Considerations
- The session name that you have provided is invalid or does not exist.
- The filepath for the picture that you have provided does not exist.
- The format of the specified image is not supported.Note: The picture formats that are currently supported are: .jpg, .jpeg, .png, .bmp, .gif and .svg.
- The page number of the paragraph index is invalid.
- The Word document is in the read-only format.
- User running the automation does not have permission to modify the Word document.
Settings
- Use the Session name field to click one of the following
options to provide session name:
- Session name: Enter the name that you gave the session when you opened it.
- Variable: Select the variable that you have created to store the session name.
- In the Alt text field, enter the name of the picture to find with in the specified Word document.
- Click the Range drop-down menu to specify the range
within the document to search, such as:
- Full document: Search for picture in the entire
document.
This is the default setting.
- Page number: Search for picture from the
specified page number in the document.
Requires a numeric value.
- Paragraph index: Search for picture from the paragraph at the
specified index in the document.
Requires a numeric value of the paragraph index.
- Bookmark name: Use an available bookmark name to search for the picture.
- Full document: Search for picture in the entire
document.
- Select the Replace picture check box to replace the picture from one
of the following options:
- Variable: To specify the file variable that contains the filepath of the picture.
- Control room file: Click Choose button to select the picture that is available in a folder in the Control Room.
- Desktop file: To select the picture from your
local device using one of the following options:
- Specific path: Click the Browse button to select the picture from a specific location.
- Regex: Either click the
Browse button to select a folder path
for the picture or click the Insert a
value icon to select a variable that you have
used to store the path of the picture.
Use the File name field to build your regex using the Type drop-down menu. The Case sensitive check box enables you to match the letter case. After you have built your regex, click the Add regex button.
Note: The Replace picture check box is not selected by default and the picture replacement will not happen. - (Optional) In the Alt text field, specify the title or alt text for
the replacement image.
If you leave this field empty or blank, the title or alt text of the source image will be used.
- (Optional) Use the following fields to define the dimensions of the replacement
picture, such as:
- Width: Enter a numeric value for the width of the picture in centimeters (cm).
- Height: Enter a numeric value for the height of the picture in cm.
- (Optional) Use the Picture occurrence field to select one of the
following options for the occurrence(s) of the picture to replace:
- All occurrences: To search and replace all the
occurrences of the picture.
This is the default setting.
- First occurrence: To search and replace only the first occurrence of the picture.
- Last occurrence: To search and replace only the last occurrence of the picture.
- All occurrences: To search and replace all the
occurrences of the picture.
- Click the Assigned search count to variable drop-down menu to select
a variable to store the number of occurrences found.
If you have not created a variable, click the Create variable icon.
Note: If you have selected the Replace picture check box, the occurrences count will contain both the number of pictures found and the ones replaced. However, if you have not selected the check box, only the number of pictures found based on the search criteria is considered.