Object Model Reference : Classes : P : Page : Properties : Page.Layers |
Property Layers As Layers
Member of Page
The Layers property returns the collection of all layers in a document. If you want to access a master layer, you can use the master page returned by Pages(0).
The Layers property returns a read-only value.
The following VBA example creates a text object on each layer of the page. The text object contains the name of the corresponding layer.
Sub Test() |
Dim lyr As Layer |
Dim n As Long |
n = 0 |
For Each lyr In ActivePage.Layers |
lyr.CreateArtisticText 0, n, lyr.Name |
n = n + 1 |
Next lyr |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.