DocSelectPageΒΆ

DocSelectPage activates the given page and returns the handle.

hPage = DocSelectPage(hDoc, nPage)
hPage = DocSelectPage(hDoc, nPage, bUpdateFields)
hPage = DocSelectPage(hDoc, ssPageName)
hPage = DocSelectPage(hDoc, ssPageName, bUpdateFields)

Return Value

hPage is the page handle. In case of an error hPage is 0.

Parameters

hDoc

Identifies the document.

nPage

nPage is the index of a page, the index starts with 1.

ssPageName

ssPageName is the page name of the page to select.

bUpdateFields

If bUpdateFields is TRUE (1) the field functions will be updated. This can slow down the function significantly. Default value is TRUE (1).

Example

AppGetActiveDocument();
nPages = DocGetPageCount(hDoc);
hvData = 0;
for (i in 1:nPages) {
    hActivePage = DocSelectPage(hDoc, i);
    if (hActivePage == 0) {
        MessageBox("Cannot display page");
        continue;
    }
    // Do something with hActivePage...
}

History

Version Description
R2015.1 New Parameter ssPageName.
5.30.0 New Parameter bUpdateFields.

id-1898806