Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Open document Version 9 (Net)

Группа действийAction group: Word

Описание

...

Description

The action opens the Открывает Word-документ.document

...

Action icon

Image RemovedImage Added

Параметры

Входные параметры

Путь до файла               Путь к файлу, который необходимо открыть.

Видимый                        Указывать, если документ необходимо открыть с интерфейсом Word.

Иначе документ будет открыт в фоновом режиме.

Пароль                           Пароль от защищенного документа.

Выходные параметры

Результат

Контекст                          Уникальный идентификатор открытого сеанса

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

Путь к файлу, который необходимо открыть.

...

C:\Word\Word_file.doc

...

Отмечено, если документ необходимо открыть с интерфейсом Word.

Иначе будет открыто в фоновом режиме.

...

Особые условия использования

Если на документе установлен пароль, необходимо ввести его в параметре "Пароль". При указании неверного пароля робот выдаст ошибку. Если параметр "Пароль" не заполнен, а на документе установлен пароль, то робот выдаст ошибку.

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

Задача

Существует файл test (2).docx. Необходимо открыть документ и добавить туда запись = "тестовая запись" в начало документа. Далее, сохранить документ и закрыть. 

Решение

Воспользоваться действием "Открыть", "Ввести текст", "Сохранить как", "Закрыть". 

Реализация:

...

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Path to filePath to the documentRobin.FilePath
Yes
VisibleIf true the document will be opened with Word interfaceRobin.BooleantrueNo
Results
ContextUnique ID of the session to which the action will be applied.Robin.WordWord context

Special conditions of use

The file to be opened can be any format listed in the table.

Image Added

When opening a file with the “Open” action, you need to confirm the conversion of a file of any format into a Word file just like in a regular text editor, and then the robot will open the file you specified.

If a password is set on the document, you should enter it in the “Password” parameter. If you specify an incorrect password, the robot will generate an error. If the “Password” parameter is not filled in and a password is set on the document, the robot will generate an error.

Example of use

Task

There is a file test (2).docx. Open the document and add a text to it = "Text" to the start of the document. Next, save the document and close it.

Solution

Use the "Open document", "Enter text", "Save as", "Close document" actions.

Implementation

  1. Assemble a robot scheme with the actions.
    Image Added
  2. Set the "Open document" action parameters.
    In the "Path to file" field specify the path to the file test (2).docx.

    Image Added

  3. Set the "Enter text" action parameters.
    In the "Context" field specify the context created in section 1.
    In the "Text" field specify value "Text".
    In the "Add text to" field specify value "Start of the document".

    Image Added
  4. Move the "Save as" action to the workspace and set its parameter.
    In the "Context" field specify the open document context.

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

  6. Click "Start" in the top panel.

Result

The program robot completed successfully. The desired text was added to the document. The file was saved and closed.

Image Added

...

Результат:

Программный робот отработал успешно. Требуемый текст добавлен в документ. Файл сохранен и закрыт.

Image Removed