Returns the number of the pages in the page collection of the document.
Applies to: Document object
[[Let] countRet =] object.PagesNum () |
The PagesNum method syntax has these parts:
Part | Description |
object | Required. An expression, that returns an instance of the Document object. |
countRet | Optional. A Long type variable. |
Returns 1 or greater, as there's always at least one page in the document.
This example contains a application-level script.. The program displays list of documents, open in the application, and the number of pages in each document by using the PagesNum method.
' Declare variables Dim pdoc As Document ' Loop through all open documents For i=1 To thisApp.DocsNum() ' Get next document Set pdoc = thisApp.Doc(i) ' Display the name of the document TRACE "Document Name : " & pdoc.Name ' Display the number of pages in the document TRACE " Number of pages = " & pdoc.PagesNum() Next i |
See Also |
AddPage method, FindPage method, Page method, PageByID method, RemovePage method, RemovePageByID method, ReorderPage method, ReorderPageByID method, Page object |