Previous Document Next Document
Page.CreateLayer

Function CreateLayer(LayerName As String) As Layer

Member of Page

The CreateLayer method adds a new layer to the document. If the layer is created on a master page, it becomes a master layer.

Parameters
Description
LayerName
Specifies a name for the new layer

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.