Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 3 Следующий »

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. 

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

Parameters

Input 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

Свойство

Описание

Тип

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

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

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

Параметры

Контекст

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

Robin.Word

Контекст Word-документа

Да

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

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


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


  • Изображения
  • Таблицы
  • Символы
  • Слова
  • Страницы

Robin.String

Изображения

Да

Учитывать надписи и сноскиЕсли значение "true", то действие подсчитает элементы с учетом надписей и сносок. Если "false", то надписи и сноски учитываться не будут.Robin.BooleantrueНет
Результат
РезультатКоличество найденных элементов указанного типа из Word-документа.Robin.Numeric23

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.

  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 = true.

  3. 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".

  4. Set the "Save as" action parameters. In the "Context" field specify the Word-document instance to be saved.

  5. Set the "Close document" action parameters. In the "Context" field specify the Word-document instance to be closed.

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

  • Нет меток