Add image Version 1 (Python)
Action group: Office
Description
The action adds an image to 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 | |
Image | The path to the image to add to the document | Robin.FilePath | Yes | |
Add text to | Location in document where image should be inserted to | Robin.String | Yes | |
Bookmark name | The name of the bookmark after which the image will be added | Robin.String | No | |
On a new line | If the value of the parameter is true, then the specified image will be added on a new line, and the subsequent text in the document will be translated to a new line. Default value is false | Robin.Boolean | true | No |
Width | The width of the image to be added | Robin.Numeric | No | |
Height | The height of the image to be added. Ignored if the «Width» parameter is not specified | Robin.Numeric | No |
Special conditions of use
None.
Example of use
Task
There is a file Problem Descriptions.docx. You need to open the document and add an image there. Then, save the document and close it.
Solution
Use the "Open", "Add image", "Save", "Close" actions.
Implementation
- Assemble a robot scheme consisting of the actions: "Open", "Add Image", "Save", "Close".
- Set the "Open" action parameter.
In the "Path to file" field specify the path to the file Problem Descriptions.docx - Set the parameters for the "Add image" action:
In the "Context" field specify the context created in step 1
In the "Image" field specify the path to the image to be added.
In the "Add text to" field specify the value "Beginning of document". - 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 image is added to the document. The file is saved and closed.
Обзор
Инструменты контента