Read-only. Returns an instance of the Page object corresponding to the active page of the document.
Applies to: Document object
[[Set] pageRetl =] object.ActivePage |
The ActivePage property syntax has these parts:
Part | Description |
object | Required. An expression returning a Document object. |
pageRet | Optional. A Page type variable. |
Note, that a document always has at least one page, and one page is always active. If there is more than one page in the document, the active page is the one displayed in the active document view. To set a new active page use the SetActivePage method. If you address the ActivePage property when the active window is note a page view (for instance, it's the ConceptDraw Basic Editor window), the ActivePage property returns the most recent active page.
This example contains a document-level script. It draws rectangles on the first three pages of the document, using the ActivePage property to address the pages. The SetActivePage is used to set active pages in this order: Page 1, then Page 2, then Page 3.
' If there are less than 3 pages in the document ' then add remaining pages If thisDoc.PagesNum() < 3 Then thisDoc.AddPage() End If If thisDoc.PagesNum() < 3 Then thisDoc.AddPage() End If ' Set page 1 as active page thisDoc.SetActivePage(1) ' Draw rectangle on page 1 thisDoc.ActivePage.DrawRect( 100, 100, 700, 500 ).Text = 1 ' Set page 2 as active page thisDoc.SetActivePage(2) ' Draw rectangle on page 2 thisDoc.ActivePage.DrawRect( 100, 100, 700, 500 ).Text = 2 ' Set page 3 as active page thisDoc.SetActivePage(3) ' Draw rectangle on page 3 thisDoc.ActivePage.DrawRect( 100, 100, 700, 500 ).Text = 3 |
See Also |
SetActivePage method, SetActivePageByID method, Page object |