4D Write v14

WR Count

Home

 
4D Write v14
WR Count

WR Count 


 

WR Count ( area ; objectNumber ) -> Function result 
Parameter Type   Description
area  Longint in 4D Write area
objectNumber  Integer in Object number
Function result  Longint in Number of objects

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.

Example  

 
PROPERTIES 

Product: 4D Write
Theme: WR Utilities
Number: 89493

 
HISTORY 

Modified: 4D Write 6.7

 
ARTICLE USAGE

4D Write Language ( 4D Write v11.6)
4D Write Language ( 4D Write v12)
4D Write Language ( 4D v13)
4D Write Language ( 4D Write v14)
4D Write Language ( 4D Write v14 R2)
4D Write Language ( 4D Write v14 R3)
4D Write Language ( 4D Write v14 R4)