Use the Insert picture action to insert an image or a picture into a Word document at a specified location. This action supports multiple formats along with the customization of size and positioning of the picture.

Considerations

An error is displayed if any of the following conditions are encountered when you deploy your automation to insert a picture or an image in a Word document:
  • 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 bookmark name that you have provided is invalid.
  • The Word document is in the read-only format.

Settings

  • Use the Session name field to specify the name of the Word session where you want to insert the picture from one of the following options:
    • 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.
  • Use the Picture path to select one of the following tabs for inserting the picture:
    • 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.

  • In the Alt text field, specify a name for the picture.
  • 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.
  • Click the Insert position drop-down menu and select one of the following positions in the Word document where you want to insert the picture:
    • Current: Is the default option and inserts the picture at the current cursor position.
    • Start: Inserts the picture at the beginning of the document.
    • End: Inserts the picture at the end of the document.
    • Bookmark: Inserts the picture at a specified bookmark.

      If you select this option, ensure that you enter the correct name of the bookmark.