API Documentation > CorelDRAW > 2025-v26 > Page > IVGPage
Page.Layers property
Gets the collection of layers on the page
Syntax:
Property Get Layers() As Layers
Remarks:
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).
Examples:
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