Get text Version 11 (Net)

Action group: Word


Description

The action saves the document to a variable

Action icon

Settings of parameters

ParameterDescription
Context nameA unique session ID to which the action will be applied.

Output parameters

Result - a variable to which the document text will be written to.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextUnique ID of the session to which the action will be applied.Robin.WordWord contextYes
Results
ResultThe variable to which the text of the document will be writtenRobin.String

Special conditions of use

Tables present in the document will be taken in text form with \r separator between cells.

Example of use

Task

There is a file test (2).docx. with name entries. Get the text of the document into a variable of type "String". Next, save the document and close it. 

Solution

Use the "Open document", "Get text", "Save as", "Close document" actions.

Implementation

  1. Assemble a robot scheme with the actions.


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


  3. Set the "Get text" action parameters.
    In the "Context" field specify the context created in section 1.
    In the "Result" field specify the text variable created beforehand.


  4. Set the "Save as" action parameter.
    In the "Context" field specify the context of the open document.


  5. Set the "Close document" action parameters.


  6. Click "Start" in the top panel.

Result

The program robot completed successfully. The text from the document was saved to a text variable. The file was saved and closed.

  • Нет меток