Get bookmarks Version 7 (Net)
Action group: Word
Description
The action gets a list of bookmark names in the document.
Action icon
Settings of parameters
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Контекст | Уникальный идентификатор сеанса, к которому будет применено действие. | Robin.Word | Контекст Word | Да |
Результаты | ||||
Результат | Коллекция имен существующих закладок | Robin.Collection |
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.
- Set the "Get value by index" action parameters.
- Set the "Enter text" action parameters.
- 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.
Обзор
Инструменты контента