Replace text in Word
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
Prerequisite component: Start Word
This component replaces specified content in a Word document.
2. Inputs
For more information about each input parameter, see the help information in the component pane of the application flow editor.
3. Outputs
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
For
Opened Word Object, select v_word_obj_1, which is the output of the prerequisite Start Word component.For
String to Replace, enter "Test".For
Replace With, enter "Alibaba Cloud RPA".For
Ignore Case, select No.For
Match Whole Word, select No.Keep the default values for the advanced options.
4.2. Example result
None
5. Example flow
Setup flow
Add a Start Word component to the canvas to open a specified Word file.
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.