Returns the specified page object.
Set variable = object.Item ( Index ) |
- Index
- Required. A Variant that specifies the name or index of the page.
Index is a variant specifying the page to reference. It can be either the index or the name of the page. For example, if the variable objForm references a form that contains a page named "pgPageOne" that has an index of 1, the following two lines of code will yield the same result:
Set objPage = objForm.Pages.Item(1)
Set objPage = objForm.Pages.Item("pgPageOne")
The Item method is the default method for the Pages collection. Therefore, the following two lines of code will yield the same result:
Set objPage = objForm.Pages.Item("pgPageOne")
Set objPage = objForm.Pages("pgPageOne")
Set objPage = objForm.Pages.Item(1)
Set objPage = objForm.Pages.Item("pgPageOne")
The Item method is the default method for the Pages collection. Therefore, the following two lines of code will yield the same result:
Set objPage = objForm.Pages.Item("pgPageOne")
Set objPage = objForm.Pages("pgPageOne")