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

Ключ

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

...

Get number of elements Version 1 (Net)

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

Описание

...

Description

The action returns the number of elements of the specified type from a Word-documentДействие возвращает количество элементов указанного типа из Word-документа

Указывается Word-документ и тип элементов для подсчета. Также возможен учитывать\не учитывать сноски и надписи при подсчете.

Иконка

Image Removed

Параметры

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

Контекст - контекст открытого Word-документа. Открыть Word-документ можно с помощью с действия "Открыть" (группа "Word"). 

Тип элементов - тип элементов, который необходимо посчитать. Доступно 5 вариантов: Изображения, Таблицы, Символы, Слова, Страницы.

Учитывать надписи и сноски - подсчет элементов с учетом или не учетом надписей и сносок в документе.

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

Результат - количество подсчитанных в документе элементов.

Настройки

Specifies the Word-document and the type of items to be counted. It is also possible to disregard footnotes and captions when counting.

Action icon

Image Added

Settings of parameters

ParameterDescription
ContextContext of the open Word-document. Open a Word-document using the "Open document" action ("Word" action group). 
Element typeType of elements to be counted. There are 5 options available: Images, Tables, Characters, Words, Pages.
Count inscriptions and footnotesCounts items with or without inscriptions and footnotes in the document.

Output parameters

Result - the number of elements counted in the document.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextThe Word document instance to which the action will be applied

Свойство

Описание

Тип

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

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

заполнения поля

Параметры

Контекст

Экземпляр Word-документа, к которому будет применено действие
.Robin.Word
Контекст
Word
-документа
context
Да
Yes

Тип элементов

Тип элементов, которые будут подсчитываться в Word-документе.

Элементы выпадающего списка:

  • Изображения
  • Таблицы
  • Символы
  • Слова
  • Страницы
    Elements typeThe type of elements that will be counted in the Word document.Robin.String
    Изображения

    Да

    Учитывать надписи и сноскиЕсли значение "true", то действие подсчитает элементы с учетом надписей и сносок. Если "false", то надписи и сноски учитываться не будут

    Yes
    Count inscriptions and footnotesIf the value is «true», then the action counts elements taking into account labels and footnotes. If «false», then labels and footnotes will not be taken into account.Robin.Booleantrue
    Нет
    No
    Результат
    Results
    РезультатКоличество найденных элементов указанного типа из Word-документа
    ResultThe number of found elements of the specified type from the Word document.Robin.Numeric
    23

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

    Отсутствуют.

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

    Задача

    Имеется Word-документ. Необходимо посчитать количество слов.

    Решение

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

    Реализация



    Special conditions of use

    None.

    Example of use

    Task

    There is a Word-document. Count the number of words.

    Solution

    Use the "Open document", "Get number of elements", "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 Word-document file. In the "Visible" field check the checkbox
    3. Собрать схему робота, состоящую из действий:
      Image Removed
    4. Настроить параметры действия "Открыть". В поле "Путь к файлу" указать путь к файлу Word-документа. В поле "Видимый" проставить чекбокс = true.

    5. Настроить параметры действия "Посчитать количество элементов". В поле "Контекст" указать экземпляр Word-документа, в котором необходимо посчитать количество слов. В поле "Тип элементов" указать "СловаSet the "Get number of elements" action parameters. In the "Context" field specify the Word-document instance where the number of words will be counted. In the "Element type" field specify "Words".

    6. Настроить параметры действия "Сохранить как". В поле "Контекст" указать экземпляр Word-документа, который нужно сохранить. 
      Image Removed
    7. Настроить параметры действия "Закрыть". В поле "Контекст" указать экземпляр Word-документа, который нужно закрыть.
      Image Removed
    8. Запустить робота по кнопке "Старт" в верхней панели. 

    Результат

    1. Set the "Save as" action parameters. In the "Context" field specify the Word-document instance to be saved.
      Image Added
    2. Set the "Close document" action parameters. In the "Context" field specify the Word-document instance to be closed.
      Image Added
    3. Click "Start" in the top panel to start the robot.

    Result

    The program robot completed successfully. The action returned the number of words in the documentПрограммный робот отработал успешно. Действие вернуло количество слов в документе.