История страницы
...
Get bookmarks Version 7 (Net)
Группа действийAction group: Word
Описание
Действие получает список имен закладок в документе.
Параметры
Входные параметры
Контекст Уникальный идентификатор сеанса, к которому будет применено действие.
Выходные параметры
Результат Коллекция имен существующих закладок.
...
Description
The action gets a list of bookmark names in the document.
Action icon
Parameters
Input parameters
Parameter | Description |
---|---|
Context | The 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". Необходимо получить имя закладки в переменную и ввести текст после закладки "Новый текст". Далее, сохранить документ и закрыть.
Решение
Воспользоваться действием "Открыть", "Взять закладки", "Получить значение по индексу", "Ввести текст", "Сохранить как", "Закрыть".
Реализация
...
- В поле "Контекст" указать контекст открытого Word-документа.
...
- В поле "Место добавления" указать значение "После закладки".
- В поле "Название закладки" указать результат действия "Получить значение по индексу".
- Проставить чекбокс=true в поле "С новой строки".
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
- Assemble a robot scheme with the actions:
- Set the "Open document" action parameters.
- In the "Path to file" field specify the path to the file test.docx.
- In the "Path to file" field specify the path to the file test.docx.
- Set the "Get bookmarks" action parameters.
- In the "Context" field specify the context of the open Word-document.
- In the "Context" field specify the context of the open Word-document.
- In the "Context" field, specify the created context in section 1.
- In the "Text" field, specify the value "New text".
- In the "Add text to" field, specify the value "After the bookmark".
- In the "Bookmark name" field, specify the result of the "Get value by index" action.
- Put the checkbox=true in the "On a new line" field.
- Set the "Save as" action parameters.
- In the "Context" field specify the context of the open document.
- In the "Context" field specify the context of the open document.
- Set the "Close document" action parameter.
- Click "Start" in the top panel.
Result
The program robot completed successfully.
The text is added to the document after the bookmark. The file is saved and closed
...
Результат
Программный робот отработал успешно.
Текст добавлен в документ после закладки. Файл сохранен и закрыт.