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

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

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

Open document Version 9 (Net)

Action group: Word


Description

The action opens the Word-document.

Action icon

Parameters

Input parameters

ParameterDescription
Path to filePath to the file to be opened.
VisibleSpecify if the document needs to be opened with the Word interface. Otherwise the document will be opened in the background.
PasswordPassword from the protected document.

Output parameters

Result

Context - a unique ID of the open session.

Settings of parameters

Свойство

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

Описание

Тип

Пример заполненияОбязательность заполнения поля
Параметры
Путь до файлаPath to file

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

Путь к файлу

C:\Word\Word_file.doc

Да
ВидимыйVisible

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

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

ЛогическийtrueНет
ПарольPasswordПароль от защищенного документа.Пароль
Нет
Результаты
КонтекстContext nameУникальный идентификатор открытого сеанса.Идентификатор контекста Word

Special conditions of use

If a password is set on the document, enter it in the "Password" parameter. If you specify an incorrect password, the robot will return an error. If the "Password" parameter is not filled in and a password is set on the document, the robot will return 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.
  2. Set the "Open document" action parameters.
    In the "Path to file" field specify the path to the file test (2).docx.



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

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

  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 desired text was added to the document. The file was saved and closed.

  • Нет меток