Get text Version 1 (Python)
Action group: Office
Description
The action takes all the text from the document
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Context for working with a document | Robin.OpenTextDo c | Yes | |
Results | ||||
Result | Text retrieved from document | Robin.String |
Special conditions of use
None.
Example of use
Task
There is a file test (2).docx. with name records. It is necessary to get the text of the document into a variable of type "String". Then, save the document and close it.
Solution
Use the "Open", "Get text", "Save", "Close" actions.
Implementation
- Move the "Open" action to the workspace and set its parameters.
In the "Path to file" field specify the path to file test (2).docx. - Move the "Get text" action to the workspace and set its parameters
In the "Context" field, specify the context created in step 1.
In the "Result" field, specify the text variable created earlier. - Move the "Save" action to the workspace and set its parameter.
In the context field specify the context of the open document. - Move the "Close" action to the workspace and set its parameter.
- Click "Start" in the top panel.
Result
The program robot completed successfully.
Text is saved from the document to the variable "Text". The file is saved and closed.
Обзор
Инструменты контента