Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 5 Текущий »

Add image Version 1 (Python)

Action group: Office


Description

The action adds an image to the document

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextContext for working with a documentRobin.OpenTextDo c
Yes
ImageThe path to the image to add to the documentRobin.FilePath
Yes
Add text toLocation in document where image should be inserted toRobin.String
Yes
Bookmark nameThe name of the bookmark after which the image will be addedRobin.String
No
On a new lineIf 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 falseRobin.BooleantrueNo
WidthThe width of the image to be addedRobin.Numeric
No
HeightThe height of the image to be added. Ignored if the «Width» parameter is not specifiedRobin.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

  1. Assemble a robot scheme consisting of the actions: "Open", '"Add Image", "Save", "Close". 
  2. Set the "Open" action parameter. 
    In the "Path to file" field specify the path to the file Problem Descriptions.docx




  3. 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".
  4. Move the "Save" action to the workspace and set its parameter.
    In the context field specify the context of the open document.

  5. Move the "Close" action to the workspace and set its parameter.


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

  • Нет меток