WP Get page count コマンドは wpDoc に指定した 4D WritePro ドキュメントの総ページ数を返します。
Items テーブルのカレントセレクション内で、"Manual" フィールドに格納されている 4D Write Pro ドキュメントの総ページ数を確認します:
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("マニュアルの総ページ数: "+String($totalCount))