Previous Document Next Document

Object Model Reference : Classes : L : Layers : Properties : Layers.Count


Layers.Count

Property Count As Long

Description

Member of Layers

The Count property returns the number of layers available.

 
To access master layers, you must access the Layers collection of the master page. The master page is accessible as Document.Pages(0).

The Count property returns a read-only value.

VBA example

The following VBA example displays the number of master layers in the active document.

Sub Test()
 MsgBox "Document contains " & ActiveDocument.Pages(0).Layers.Count & " layer(s)"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.