Command WR Count

4D Write

WR Count

version 6.7 (Modified)


WR Count (area; objectNumber) Longint

ParameterTypeDescription
areaLongint4D Write area
objectNumberIntegerObject number

Function result Longint Number of objects

Description

The WR Count command allows you to count the number of occurrences of a specific object in a specific area.

Objects that can be counted are:

ObjectConstantsObjectNumber
Characterswr nb characters0
Wordswr nb words1
Paragraphswr nb paragraphs2
Picture in text flowwr nb pictures in text flow3
Referenceswr nb objects4
Hyphenswr nb soft hyphens5
Page breakswr nb page breaks6
Column breakswr nb column breaks7
Time objectswr nb insertions date time8
Page numberswr nb insertions page number9
Lineswr nb lines10
Pageswr nb pages11
Style sheetswr nb stylesheets12
Images in pages (background)wr nb pictures in page13
Hyperlinkswr nb hyperlinks14 (6.7)
RTF Expressionswr nb RTF expressions15 (6.7)
HTML Expressions wr nb HTML expressions16 (6.7)

• If objectNumber equals 3, background pictures will be ignored (if you want background pictures to be counted, objectNumber must equal 13).

• If objectNumber equals 12, WR Count returns the number of style sheets, including the standard style sheets (default style sheet).

• If objectNumber equals 13 and if an image is repeated in several pages (as selected in the picture properties dialog), the image counts as one.

If you pass a wrong area reference to the command, the error 1022 will be returned.

Examples

See examples for the following commands: WR SELECT, WR INSERT PAGE NUMBER, WR DELETE PICTURE IN PAGE, WR GET WORDS, WR GET PARAGRAPHS and WR UPDATE STYLESHEET.

See Also

WR Replace, WR SELECT.