订阅

UiPath 活动

UiPath 活动指南

替换图片

UiPath.Word.Activities.WordReplacePicture

描述

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.

属性

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.

“替换图片”活动使用示例

为举例说明该活动的具体用法,我们构建了一个自动化项目,用于在 Word 文档中将某图片的所有实例替换为指定图片。您可在此处下载该工作流。

UiPath.Word.Activities.WordReplacePicture

描述

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.

The Alt text is a short description of the image, which makes sense of that image when it can't be viewed. It describes the content of the image in a succinct and specific way. To set or view the alt text of an image in Word, right click the image and choose Edit Alt Text... from the context menu.

配置活动

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.

3个月前更新


替换图片


建议的编辑仅限用于 API 参考页面

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