Position the cursor in a Word document

Updated at:

This document describes how to use the Word component in the visual editor of Alibaba Cloud RPA.

1. Component overview

Note

Prerequisite: The Launch Word component.

Use this component to position the cursor relative to specific text in a Word document.

2. Inputs

Note

For details about each input parameter, see the help information in the component panel of the visual editor.

3. Outputs

Note

For details about each output parameter, see the help information in the component panel of the visual editor.

4. Component usage example

4.1. Component configuration example

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

  2. For Relative To, select 'Text Content'.

  3. In the Text Content field, enter the text to locate, such as 'RPA'.

  4. For Text Occurrence, the default value is '1'.

  5. For Position Cursor To, select 'After Text'.

  6. Keep the default values for the advanced options.

4.2. Example execution result

None

5. Flow creation example

Setup flow

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

  2. Add a Position Word Cursor component to the canvas to position the cursor after the first occurrence of the text 'RPA' in the Word file.

Execution result

The program opens the specified Word file and then positions the cursor after the text 'RPA' in the file.