UiPath Activities

The UiPath Activities Guide

Replace Picture

UiPath.Word.Activities.WordReplacePicture

Description

Replaces all the occurrences of a picture in a Word document with another specified picture. The picture to replace is identified by its Alt Text. This activity can only be used within a Word Application Scope activity.

Properties

Common

  • DisplayName - The display name of the activity.

Input

  • Find pictures with Alt Text - The Alt Text of the picture that you want to replace. This field supports only strings and String variables.
  • Replace with picture - The path to the picture you want to use as a replacement. This field supports only strings and String variables.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Example of Using the Replace Picture Activity

To exemplify how to use this activity, we have built an automation project which replaces all the instances of a picture in a Word document with a specified picture. You can download the workflow here.

UiPath.Word.Activities.WordReplacePicture

Description

Replaces all the occurrences of a picture in a Word document with another specified picture. The picture to replace is identified by its Alt Text. This activity must be added inside a Use Word File activity.

Configuring the Activity

In the Body of the Activity

  • Find pictures with Alt Text - Click Plus plus button on the right side of the field, and then select Text to enter the Alt Text of the picture to replace in the Text Builder. Alternatively, you can use one of the other options in the menu to indicate the Alt Text:
    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains the text, or indicate a field from a selected email in Outlook that contains the text.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Ask when run - Prompt for the text when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
  • Replace with picture - Click Browse browse files next to the field, and then browse to and select an image file to replace the picture in the document. Alternatively, click Plus plus button on the right side of the field, and then, from the menu, choose one of the available options to indicate the path to the image file to replace the picture with:
    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains the file path, or indicate a field from a selected email in Outlook that contains the file path.
    • Use Saved Value - Select a value in the form of a file path that you previously saved for later use in the project.
    • Text - Enter the file path in the Text Builder.
    • Ask when run - Prompt for a file path when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.

In the Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

Input

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Updated about a month ago


Replace Picture


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.