WR Count
version 6.7 (Modified)
WR Count (area; objectNumber) Longint
Parameter | Type | Description | |
area | Longint | 4D Write area | |
objectNumber | Integer | Object 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:
Object | Constants | ObjectNumber |
Characters | wr nb characters | 0 |
Words | wr nb words | 1 |
Paragraphs | wr nb paragraphs | 2 |
Picture in text flow | wr nb pictures in text flow | 3 |
References | wr nb objects | 4 |
Hyphens | wr nb soft hyphens | 5 |
Page breaks | wr nb page breaks | 6 |
Column breaks | wr nb column breaks | 7 |
Time objects | wr nb insertions date time | 8 |
Page numbers | wr nb insertions page number | 9 |
Lines | wr nb lines | 10 |
Pages | wr nb pages | 11 |
Style sheets | wr nb stylesheets | 12 |
Images in pages (background) | wr nb pictures in page | 13 |
Hyperlinks | wr nb hyperlinks | 14 (6.7) |
RTF Expressions | wr nb RTF expressions | 15 (6.7) |
HTML Expressions | wr nb HTML expressions | 16 (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