Get(PageNumber)

Category: Get

Syntax: Get ( PageNumber )

Parameters: None

Data type returned: Number

Description:

When printing or previewing a document, this function returns the current page number. If nothing is being printed or previewed, Get (PageNumber) returns 0.

If you are printing a report of unknown length and you want to determine the number of pages, you can have a script go to the last page in Preview mode and capture the value returned by Get (PageNumber) in a global field. This would then allow you to have something like "Page 2 of 5" appear in the footer of your report.

Examples:

Imagine you have an unstored calculation with the formula:

"Page " & Get (PageNumber)

When printing a multi-page report, this field could be placed in the footer of the layout and it would return the proper page number when the report was previewed or printed.

Категории