Understanding the CorelDRAW object model : Working with pages : Modifying pages |
You can modify a page regardless of whether it is active.
• |
Activating a page in an inactive document does not activate that document. To activate a document, you
must use its Activate method (see Activating documents).
|
By explicitly referencing the page that you want to modify, you can make those changes without activating the page. The following VBA code deletes all shapes on page 3 of the active document without activating that page:
Public Sub DeleteShapesFromPage3() |
Dim doc As Document |
Set doc = ActiveDocument |
doc.Pages(3).Shapes.All.Delete |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.