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

Replace Text in Document

UiPath.Word.Activities.DocumentReplaceText

Description

Replaces all occurrences of a string within a document with another string.

Project compatibility

Windows - Legacy | Windows | Cross-platform

Cross-platform, Windows configuration

Note: For cross-platform projects, the activity can be found under the name Replace Text.

The body of the activity

  • File - The full path of the Word file to be used. Click Plus on the right side of the field to toggle between using a local path or a Resource file.We recommend using relative folder paths to accommodate the file structure variations between Windows and Linux during project execution. For example, newFolder or otherFolder.
  • Search - The text to be replaced. Only String variables and strings are supported.

    Note: Strings must be placed between quotation marks.
  • Replace - The text to replace with. Only String variables and strings are supported.

Properties

Output
  • Found - A boolean variable that indicates whether the text to be replaced was found or not.

Windows-Legacy configuration

Properties

Input
  • Search - The text to be replaced. Only String variables and strings are supported.

    Note: Strings must be placed between quotation marks.
  • Replace - The text to replace with. Only String variables and strings are supported.
Result
  • Found - A boolean variable that indicates whether the text to be replaced was found or not.
File
  • FilePath - The full path of the Word file to be used. If the Word file to be used is located in the project folder, its relative path can be used. Only String variables and strings are supported.
Common
  • DisplayName - The display name of the activity.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

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.