activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 21, 2024

Replace Text in Document

UiPath.Word.Activities.WordReplaceText

Description

Replaces all occurrences of a text in a Word document with another specified text. This activity must be added inside a Use Word File activity.

To learn how to use this activity:

Configuring the Activity

In the Body of the Activity
  • Search for - The text to be replaced (must not exceed 256 characters). Click Plus  on the right side of the field, and then, from the menu, choose one of the available options to indicate the 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.
    • Text - Enter the text in the Text Builder.
    • Ask when run - Prompt for the text when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
  • Replace with - The text to replace with (must not exceed 256 characters). Click Plus  on the right side of the field and choose one of the available options to indicate the 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.
    • Text - Enter the text in the Text Builder.
    • Ask when run - Prompt for the text when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
Properties Panel

Common

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

Input

  • See the options in the body of the activity.

Misc

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

Result

  • Found - A Boolean value that is TRUE if the text was found in the document or FALSE if the text was not found. You can save the value for later use in the project.
  • Description
  • Configuring the Activity

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.