FindPage Method

Searches for a page in the page collection of the document. Returns the index of the page in the page collection of the document.

Applies to: Document object

Syntax

[[Let] indexRet =] object.FindPage ( pageObj )

The FindPage method syntax has these parts:

Part Description
object Required. An expression, that returns a Document object.
pageObj Required. An expression, that returns a Page object. Represents the page which index is to be returned.
indexRet Optional. A Long type variable.

Remarks

If the specified page was not found in the page collection of the document, the FindPage method returns 0. The inverse method to FindPage is the Page method, which returns a page by its index in the page collection of the document.

Example

This example contains a page-level script. It draws a rectangle in the upper left corner of the page, which contains the number of the page in the page collection of the document. The FindPage method is used to find the number of the page.

thisPage.DrawRect( 0,0,100,100 ).Text = thisDoc.FindPage( thisPage )

 

See Also

AddPage method, Page method, PageByID method, PagesNum method, RemovePage method, RemovePageByID method, ReorderPage method, ReorderPageByID method, Page object