Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Enter text Version 8 (Net)

Action group: Word

...

Description

Adds text to the document.

Action icon

Image Removed

Parameters

Input parameters

Context - Unique identifier of the session to which the action will be applied.

Text - The text to be added to the Word document.

Add text to - The location in the document where the text will be added.

A dropdown list is available: 

  • Start of the document
  • End of the document
  • After the bookmark

Bookmark name - The name of the bookmark after which the text should be entered. It is assumed that the field will become available after selecting the "After the bookmark" value in the "Add text to" parameter

On a new line - The text will be added from a new line.

Output parameters

Result

The required text is added to the document. The file is saved and closed.

Settings

Image Added

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".

...

  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.

...