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

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

« Предыдущий Версия 4 Следующий »

Insert image Version 1 (Net)

Action group: Word


Description

The action inserts an image at the specified location in a Word-document.

You specify a Word-document, an image for insertion, and location where to add it. You can also optionally specify the size of the image and the possibility of adding it from a new line.

Action icon

Settings of parameters

Свойство

Описание

Тип

Пример заполнения

Обязательность заполнения поля

Параметры

Контекст

Экземпляр Word-документа, к которому будет применено действие.

Robin.Word

Контекст Word-документа

Да

Изображение

Путь к файлу изображения, которое будет вставлено в Word-документ.

Robin.FilePath

C:\User\image.jpg

Да

ВысотаВысота в пикселях, которая будет установлена указанному изображению при вставке. Не учитывается, если не заполнена "Ширина". Указывается в пикселях.Robin.Numeric500Нет
ШиринаШирина в пикселях, которая будет установлена указанному изображению при вставке. Не учитывается, если не заполнена "Высота". Указывается в пикселях.Robin.Numeric500Нет
Место добавления

Место в документе, куда будет вставлено изображение.

Выпадающий список с элементами:

  • Начало документа
  • Конец документа
  • После закладки
Robin.StringПосле закладкиДа
Название закладкиНазвание закладки, после которой будет вставлено изображение.Robin.StringЗакладка1Нет
С новой строкиЕсли значение "true", то изображение будет вставлено с новой строки. Последующий текст в документе будет также перенесен на новую строку.Robin.BooleantrueНет

Special conditions of use

The markup option for the inserted image is "In text":


If the place of adding after the bookmark is selected, it is necessary to specify the name of the bookmark. Otherwise, the robot will return an error.

If both bookmark name and place of addition are specified in the parameters, but the place of addition is different from "after the bookmark" then the action will ignore the bookmark name parameter.

If you select the location to add after the bookmark, but there are no bookmarks in the document, the robot will return an error.

If one of the height or width parameters is not filled in, the image will be inserted into the document at its own size.

The action does not work with locked fields in protected documents. In this case the robot will return an error.

More about bookmarks in Word: Bookmarks in Word

Example of use

Task

There is a Word-document. Insert and image after the bookmark.

The document:

Solution

Use the "Open", "Insert image", "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 Word-document file. In the "Visible" field check the checkbox = true.

  3. Set the "Insert image" action parameters.  In the "Context" field, specify the Word-document instance in which you want to insert the image. In the "Image" field, specify the path to the image to be inserted. In the "Height" and "Width" fields, specify the required image size. In the "Place to add" field specify "After bookmark". In the "Bookmark name" field specify the name of the existing bookmark after which the image will be inserted. In the "A new line" field check the checkbox = true.

  4.  Set the "Save as" action parameters. In the "Context" field specify the Word-document instance to be saved.

  5. Set the "Close document" action parameters. In the "Context" field specify the Word-document instance to be closed.

  6. Click "Start" in the top panel to start the robot.

Result 

The program robot completed successfully. The image was inserted at the specified location.

Word-document:



  • Нет меток