Enter text Version 8 (Net)

Action group: Word


Description

Adds text to the document.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextUnique ID of the session to which the action will be applied.Robin.WordWord contextYes
TextText to be added to the documentRobin.String
Yes
Add text toLocation in document where text should be inserted toRobin.String
Yes
Bookmark nameThe name of the bookmark after which the text will be addedRobin.String
No
On a new lineIf the parameter value is true, then the specified text will be added on a new line, and the subsequent text in the document will be transferred to a new line. The default is false.Robin.BooleantrueNo

Special conditions of use

In protected documents, the action inserts text only into unblocked fields. To do this, set a bookmark before the unlocked field using the "Create bookmark" action, then in the "Enter text" action specify "After bookmark" in the "Add location" parameter and specify the name of the bookmark in the "Bookmark name" parameter. Thus, the text will be entered in the first unblocked field after the specified bookmark.

Example of use

Task

There is a file test (2).docx. You need to open the document and add a record = "test record" to the beginning of the document. Then, save the document and close it. 

Solution

Use the action "Open document", "Enter text", "Save as", "Close document".

Implementation

  1. Assemble a robot scheme consisting of actions: 


  2. Fill in the parameters for the "Open document" action. 
    In the "Path to file" field specify the path to the file test (2).docx 


  3. Fill in the parameters for the "Enter text" action. 
    In the "Context" field specify the context created in step 1.
    In the "Text" field specify the value "test record".
    In the "Add text to" field, specify the value "Start of Document".
  4. Move the "Save As" action to the workspace and fill its parameter. In the "Context" field, specify the context of the open document.
  5. Move the "Close document" action to the workspace and fill in its parameter.
  6. Click on the "Start" button in the top panel.

Result

The program robot completed successfully. The required text is added to the document. The file is saved and closed.

  • Нет меток