# Replace Text

> `UiPath.GSuite.Activities.ReplaceText`

`UiPath.GSuite.Activities.ReplaceText`

## Description

Replaces all instances of specified text in the body of a Google document.

### Scopes

This activity requires the following scopes:

* https://www.googleapis.com/auth/drive.file

OR

* https://www.googleapis.com/auth/documents

OR

* https://www.googleapis.com/auth/drive

## Project compatibility

Windows - Legacy | Windows

## Configuration

#### In the body of the activity

* **Document** - A reference to a Google Document in which the text will be replaced. Typically obtained via the [Use Google Document](https://docs.uipath.com/activities/other/latest/productivity/google-docs-application-scope) activity. This property supports `IGoogleDocTarget` variables.
* **SearchFor** - The exact text that you want to replace with the text specified in the **ReplaceWith** property. This property supports `String` variables and string formatted values.
* **ReplaceWith** - The text that you want to add to the document. If this property is empty, the text specified in the **SearchFor** property is replaced with an empty string. This property supports `String` variables and string formatted values.
* **Match case** - If selected, the search is case sensitive. This option is not selected by default.

#### Properties panel

**Common**

* **ContinueOnError** - If set, the remaining activities are executed if the current activity fails. This field supports Boolean values.
* **DisplayName** - The display name of the activity. This property supports `String` variables and string formatted values.

**Input**

* **DocumentID** - The ID of the document that you want to change. This property supports `String` variables and string formatted values.
* **Google document** - A reference to a document added in a parent **Use Google Document** activity.
* **ReplaceWith** - See **Replace with** in the body of the activity.
* **SearchFor** - See **Search for** in the body of the activity.

**Misc**

* **IsInsideBatchUpdateScope** - If selected, indicates the activity is added inside a [Batch Document Updates](https://docs.uipath.com/activities/other/latest/productivity/gsuite-batch-update-document-scope) activity. This field supports Boolean values.
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.

**Options**

* **MatchCase** - See **Match case** in the body of the activity.
