4D v16

WP Get page count

Home

 
4D v16
WP Get page count

WP Get page count 


 

WP Get page count ( wpDoc ) -> Function result 
Parameter Type   Description
wpDoc  Object in 4D Write Pro document
Function result  Longint in Number of pages in document

The WP Get page count command returns the total number of pages defined in the wpDoc 4D Write Pro document.

Example  

You want to know the total number of 4D Write Pro document pages stored in the "Manual" field within the current selection of items. You can write:

 C_LONGINT($pageCount)
 C_LONGINT($totalCount)
 FIRST RECORD([Items])
 While(Not(End selection([Items]))
    $pageCount:=WP Get page count([Items]Manual)
    $totalCount:=$totalCount+$pageCount
    NEXT RECORD([Items])
 End while
 ALERT("Total number of manual pages: "+String($totalCount))

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language

 
HISTORY 

New
Created: 4D v16

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)