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

Ключ

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

...

Enter text Version 1 (Python)

...

Action group:

...

Office

Описание

Действие добавляет текст в документ

...

Description

The action adds text to the document

Action icon

Настройки

Settings of parameters

Свойство
Property
Описание
Description
Тип
Type

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

Обязательность заполнения поля

Параметры

Контекст

Контекст для работы с документом

Robin.OpenTextDoc

Да

Текст

Текст, который необходимо добавить в документ
Filling exampleMandatory field
Parameters
ContextContext for working with a documentRobin.OpenTextDo c
Yes
TextText to be removedRobin.String
Да

Yes

Место добавления

Место в документе, куда будет добавлен текст

Robin.String

Да

Название закладки

Имя закладки, после которой будет добавлен текст

Robin.String

Нет

С новой строки

Если значение параметра равно true, то заданный текст будет добавлен с новой строки, а последующий текст в документе будет переведен на новую строку. Значение по умолчанию - false.

Robin.Boolean

true

Нет

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

Отсутствуют 

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

Задача: существует файл test (2).docx. Необходимо добавить туда запись = "тестовая запись" в начало документа. Далее, сохранить документ и закрыть. 

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

Реализация:

...

All matchesIf the parameter value is True, then all found matches will be deleted. Otherwise, only the first fragment found. The default value is «false»Robin.BooleantrueNo
Case sensitiveIf the value of the parameter is True, then the case of characters will be taken into account when searching for matches. The default value is «false»Robin.BooleantrueNo
Results
ResultString variable containing the processed textRobin.String

Special conditions of use

None.

Example of use

Task 

There is a file test (2).docx. You need to add a record = “test record” to the beginning of the document. Then, save the document and close it. 

Solution

Use the "Open", "Enter text", "Save", "Close" actions.

Implementation

  1. Move the "Open" action to the workspace and set its parameters.
    In the "Path to file" field specify the path to file test (2).docx.

    Image Added


  2. Move the "Enter text" action to the workspace and set its parameters.
    In the "Context" field specify the context created in section 1.
    In the "Text" field, specify the value "Text".
    In the "Add text to" specify the value "Start of document".  

    Image Added
  3. Move the "Save" action to the workspace and set its parameter.
    In the context field specify the context of the open document.

    Image Added
  4. Move the "Close" action to the workspace and set its parameter.
    Image Added

  5. Click "Start" in the top panel.

Result

The program robot completed successfully. The needed text was added to the document. The file was saved and closed

...

Результат:

...

.