Delete text Version 1 (Python)
Action group: Office
Description
The action deletes the specified 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 | |
Text | Text to be removed | Robin.String | Yes | |
All matches | If the parameter value is True, then all found matches will be deleted. Otherwise, only the first fragment found. The default value is «false» | Robin.Boolean | true | No |
Case sensitive | If the value of the parameter is True, then the case of characters will be taken into account when searching for matches. The default value is «false» | Robin.Boolean | true | No |
Results | ||||
Result | String variable containing the processed text | Robin.String |
Special conditions of use
None.
Example of use
Task
There is a file test.docx with a list of names.
It is necessary to open the document and delete the name Maria. Next, save the document and close it.
Solution
Use the "Open", "Delete text", "Save", "Close" actions.
Implementation
- Assemble a robot scheme consisting of the actions: "Open", "Delete text", "Save", "Close".
- Set the "Open" action parameter.
In the "Path to file" field specify the path to the file test.docx - Set the parameters for the "Delete text" action:
In the "Context" field, specify the context created in step 1
In the "Text" field specify the value to be deleted. - 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.
The required text in the document is deleted. The file is saved and closed.
Обзор
Инструменты контента