GetDocCurrentPage method

The current page number of the open document is returned in the specified variable.

Method:
short GetDocCurrentPage(
VARIANT * pPage )
Parameters
pPage
Points to a variable to receive the current page number of the open document. On return, this variable is set to type VT_I4.
Description
The current page number of the open document is returned in the specified variable.
Return Value
Refer to return codes.
See Also
SetDocCurrentPage, GetDocNumPages methods

C/C + +

The following example retrieves the current page number of the open document.
 CArsOle * pArsCtrl;
 VARIANT vari;
 long page_num;
 short rc;

   .
   .

  rc = pArsCtrl->GetDocCurrentPage( &vari );
  if ( rc != ARS_OLE_RC_SUCCESS )
    ERROR;

  page_num = var.lVal;

   .
   .

Visual Basic

Dim rc As Integer
Dim page_num As Variant

 .
 .

rc = ArsOle.GetDocCurrentPage (page_num)
If rc <> ARS_OLE_RC_SUCCESS Then
   MsgBox "ERROR"
   End
End If

 .
 .