.. highlightlang:: us .. index:: DocSelectPage .. _docselectpage: DocSelectPage ============= .. us.tag DocSelectPage NOTREADYENGLISH DocSet Changed300 Changed5300 Changed5701 :ref:`DocSelectPage` activates the given page and returns the handle. .. function:: hPage = DocSelectPage(hDoc, nPage) hPage = DocSelectPage(hDoc, nPage, bUpdateFields) hPage = DocSelectPage(hDoc, ssPageName) hPage = DocSelectPage(hDoc, ssPageName, bUpdateFields) .. us.return **Return Value** *hPage* is the page handle. In case of an error *hPage* is 0. .. us.params **Parameters** .. uparam:: hDoc Identifies the document. .. uparam:: nPage *nPage* is the index of a page, the index starts with 1. .. uparam:: ssPageName *ssPageName* is the page name of the page to select. .. uparam:: bUpdateFields If *bUpdateFields* is TRUE (1) the field functions will be updated. This can slow down the function significantly. Default value is TRUE (1). .. us.example **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... } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2015.1 - New Parameter *ssPageName*. * - 5.30.0 - New Parameter *bUpdateFields*. .. seealso:: :ref:`overview-documents`, :ref:`overview-document-pages`, :ref:`DocLoadPage`, :ref:`DocGetAllPages` :sub:`id-1898806`