Replace_Text
Replace Text activity is used to replace specific text in the document with the required text.
Using Replace Text Activity
- Make sure the prerequisites for using this activity are met.
- Create a new process.
- In the Canvas Tools pane, click Word to expand the tool and view the associated activities.
- Drag the Replace Text activity and drop on to the Flowchart designer on the Canvas.
- Define all the input parameters as In arguments and output parameters as Out arguments in the Argument bar to make it available for the selection.
- From the File Path dropdown list, select the In argument holding the required file path value, along with the file name and extension, of the required word document. The selected argument must be of String type.
- From the Search For dropdown list, select the In argument holding the text that must be searched and replaced in the word document. The selected argument must be of String type.
NOTE:
If input value for this dropdown list is case-sensitive, and the parameter needs to be defined accordingly.
- From the Replace With dropdown list, select the In argument holding the text required to replace the searched text. The selected argument must be of String type.
- From the ReplaceOption dropdown list, select the required option.
- Replace: To replace the first occurrence of the specified text
- ReplaceAll: To replace all occurrences of the specified text
- Click the Output Result link and from the Output Mapping dropdown list, select the required Boolean type of Output parameter to map the status of the operation performed.
The Replace Text activity is configured.
Replace Text Properties
The properties of Replace Text activity are listed in the following table and can be edited in the Properties grid on the right pane.
Property Name |
Usage |
Control Execution |
|
Ignore Error |
When this option is set to Yes, the application ignores any error while executing the activity. If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception. By default, this option is set to No. |
Delay |
|
Wait After (ms) |
Specify the time delay that must occur after the activity is executed. The value must be in milliseconds. |
Wait Before (ms) |
Specify the time delay that must occur before the activity is executed. The value must be in milliseconds. |
Misc |
|
Breakpoint |
Select this option to mark this activity as the pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected. In large or complex processes, breakpoints help in identifying the error, if any. |
Commented |
Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution. |
DisplayName |
The display name of the activity in the flowchart designer area. By default, the name is set as Replace Text. You can change the name as required. |