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

Ключ

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

...

Replace text Version 2 (Net)

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

Описание

Действие заменяет все вхождения строки в документе другой строкой.

Image Removed

Параметры

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

 

Контекст                                        Контекст действия для работы с Word-документом.

Заменить                                      Текст, который необходимо заменить. Длина текста не должна превышать 254 символа.

На                                                  Новое значение для текста, который необходимо заменить. Длина текста не должна превышать 254 символа.

Заменить совпадение                  При выборе соответствующего значения будут заменены все совпадения или только первое.

Настройки

...

Description

The action replaces all occurrences of a string in the document with another string.

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with a Word document

Свойство

Англ. наименование

Описание

Тип

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

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

Параметры

Контекст

Context nameКонтекст действия для работы с Word-документом
.Robin.Word
Контекст
Word context

Да

Заменить
Yes
Replace
Текст, который необходимо заменить. Длина текста не должна превышать 254 символа
Text to be replaced. The maximum text length is 254 characters.Robin.String
Да

Yes

На

On the
ToThe new value for the text to be replaced. The maximum text length is 254 characters
Новое значение для текста, который необходимо заменить. Длина текста не должна превышать 254 символа
.Robin.String

Да

Заменить совпадение

Yes
Replace
matchПри выборе соответствующего значения будут заменены все совпадения или только первое
matchSelecting the appropriate value will replace all matches or just the first one.Robin.String

Да

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

В защищенных документах действие работает только с незаблокированными полями.

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

Задача

Существует Word-документ с текстом имен . Необходимо заменить имя Саша на Петя (все совпадения). 

Image Removed

Решение

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

Реализация

...


Yes

Special conditions of use

In protected documents, the action works only on unlocked fields.

Example of use

Task

There is a Word-document with the text of names. It is necessary to replace the name Alex with Petr (all matches). 

Image Added

Solution

Use the actions "Open document", "Replace text", "Save as". 

Implementation

  1. Assemble a robot scheme consisting of actions:
    Image Added
  2. Set the parameters for the "Open" action.
    In the "Path to file " field specify the path where the required file is located;
    In the "Visible" field set checkbox = true to open the file in visible mode. 
    Image Added
  3. Set parameters for the "Replace text" action.
    In the "Context" field specify the context of the opened document;
    In the "Replace" field specify the value in the text to be changed;
    In the "To" field, specify the value to replace the specified text with;
    In the "Replace match" field specify the value - All matches. 
    Image Added
  4. Set parameters for the "Save As" action. 
    Specify the context of the document in the "Word-document" field. The document will be saved. 
    Image Added
  5. Launch the robot using the "Start" button in the top panel. 

Result

The program robot completed successfully. The required text has been replaced. 

Image Added

Image Added

...

Результат

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

Image Removed