Previous Document Next Document

Object Model Reference : Classes : P : Page : Methods : Page.CreateLayer


Page.CreateLayer

Function CreateLayer(LayerName As String) As Layer

Description

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.

Parameter
Description
LayerName
Specifies the name of the new layer

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.