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

Ключ

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

...

Get text Version 11 (Net)

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

Описание

Сохраняет текст документа в переменную.

Иконка

Image Removed

Параметры

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

Контекст           Уникальный идентификатор сеанса, к которому будет применено действие.

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

Результат Переменная, в которую будет записан текст документа.

Настройки

...

Свойство

...

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

...

Описание

...

Тип

...

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

Таблицы, присутствующие в документе будут взяты в текстовом виде с разделителем \r между ячейками.

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

Задача

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

Решение 

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

Реализация

...

Description

The action saves the document to a variable

Action icon

Image Added

Settings of parameters

ParameterDescription
Context nameA unique session ID to which the action will be applied.

Output parameters

Result - a variable to which the document text will be written to.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextUnique ID of the session to which the action will be applied.Robin.WordWord contextYes
Results
ResultThe variable to which the text of the document will be writtenRobin.String

Special conditions of use

Tables present in the document will be taken in text form with \r separator between cells.

Example of use

Task

There is a file test (2).docx. with name entries. Get the text of the document into a variable of type "String". Next, save the document and close it. 

Solution

Use the "Open document", "Get text", "Save as", "Close document" actions.

Implementation

  1. Assemble a robot scheme with the actions.
    Image Added

  2. Set the "Open document" action parameters.
    In the "Path to file" field specify the path to the file test (2).docx
    Image Added

  3. Set the "Get text" action parameters.
    In the "Context" field specify the context created in section 1.
    In the "Result" field specify the text variable created beforehand.
    Image Added

  4. Set the "Save as" action parameter.
    In the "Context" field specify the context of the open document.
    Image Added

  5. Set the "Close document" action parameters.
    Image Added

  6. Click "Start" in the top panel.

Result

The program robot completed successfully. The text from the document was saved to a text variable. The file was saved and closed.

Image Added

Результат

Программный робот отработал успешно. Текст сохранен из документа в переменную "Текст". Файл сохранен и закрыт.

Image Removed