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

Ключ

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

...

Get bookmarks Version 7 (Net)

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

Описание

Действие получает список имен закладок в документе. 

Image Removed

Параметры

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

Контекст           Уникальный идентификатор сеанса, к которому будет применено действие.

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

Результат Коллекция имен существующих закладок.

...

Description

The action gets a list of bookmark names in the document.

Action icon

Image Added

Parameters

Input parameters

ParameterDescription
ContextThe unique ID of the session to which the action will be applied.

Output parameters

Result - a collection of existing bookmark names.

Settings of parameters

СвойствоОписаниеТипПример заполненияОбязательность заполнения поля
Параметры
КонтекстУникальный идентификатор сеанса, к которому будет применено действие.Robin.WordКонтекст WordДа
Результаты
РезультатКоллекция имен существующих закладокRobin.Collection
  

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

Отсутствуют.

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

Задача 

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

Решение 

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

Реализация

...

  1. В поле "Контекст" указать контекст открытого Word-документа.
    Image Removed

...

  1. В поле "Контекст" указать созданный контекст в п.1
  2. В поле "Текст" указать значение "Новый текст".
  3. В поле "Место добавления" указать значение "После закладки". 
  4. В поле "Название закладки" указать результат действия "Получить значение по индексу". 
  5. Проставить чекбокс=true в поле "С новой строки".
    Image Removed


Special conditions of use

None.

Example of use

Task 

There is a file test.docx. It has a bookmark with the name "Bookmark 1". Get the value of the bookmark name to a variable and insert text "New text" after the bookmark. Next, save the document and close it.

Solution 

Use the "Open document", "Get bookmarks", "Get value by index", "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.
    1. In the "Path to file" field specify the path to the file test.docx.
      Image Added

  3. Set the "Get bookmarks" action parameters.
    1. In the "Context" field specify the context of the open Word-document.
      Image Added

  4. Set the "Get value by index" action parameters.
    Image Added

  5. Set the "Enter text" action parameters.
    1. In the "Context" field, specify the created context in section 1.
    2. In the "Text" field, specify the value "New text".
    3. In the "Add text to" field, specify the value "After the bookmark".
    4. In the "Bookmark name" field, specify the result of the "Get value by index" action.
    5. Put the checkbox=true in the "On a new line" field.
      Image Added
  6. Set the "Save as" action parameters.
    1. In the "Context" field specify the context of the open document.
      Image Added

  7. Set the "Close document" action parameter.
    Image Added

  8. Click "Start" in the top panel.

Result

The program robot completed successfully.

Image Added

The text is added to the document after the bookmark. The file is saved and closed

...

Результат

Программный робот отработал успешно.

Image Removed

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