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

  1. Assemble a robot scheme with the actions:


  2. Set the "Open document" action parameters.
    1. In the "Path to file" field specify the path to the file test.docx.


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


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


  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.

  6. Set the "Save as" action parameters.
    1. In the "Context" field specify the context of the open document.


  7. Set the "Close document" action parameter.


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


  • Нет меток