Object Model Reference : Classes : P : Page : Methods : Page.CreateLayer |
Function CreateLayer(LayerName As String) As Layer
Member of Page
The CreateLayer method adds a new layer to a document. If the layer is created on a master page, it becomes a master layer.
The following VBA example adds a new layer named MyLayer to the active page and creates a rectangle on the new layer.
Sub Test() |
Dim lr As Layer |
Set lr = ActivePage.CreateLayer("MyLayer") |
lr.CreateRectangle 0, 0, 2, 2 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.