Replace text in Word

Updated at:

This document provides an example of how to use the Word component in the application flow editor of Alibaba Cloud RPA.

Replace text in Word

1. Component description

Note

Prerequisite component: Start Word

This component replaces specified content in a Word document.

2. Inputs

Note

For more information about each input parameter, see the help information in the component pane of the application flow editor.

3. Outputs

Note

For more information about each output parameter, see the help information in the component pane of the application flow editor.

4. Component example

4.1. Configuration example

  1. For Opened Word Object, select v_word_obj_1, which is the output of the prerequisite Start Word component.

  2. For String to Replace, enter "Test".

  3. For Replace With, enter "Alibaba Cloud RPA".

  4. For Ignore Case, select No.

  5. For Match Whole Word, select No.

  6. Keep the default values for the advanced options.

4.2. Example result

None

5. Example flow

Setup flow

  1. Add a Start Word component to the canvas to open a specified Word file.

  2. Add a Replace Text in Word component to the canvas to replace "Test" with "Alibaba Cloud RPA" in the Word document.

Execution result

The program opens a Word file from a specified path and then replaces all occurrences of "Test" with "Alibaba Cloud RPA" in the file.