Previous Document Next Document
Layers.Count

Property Count As Long

Member of Layers

The Count property returns the number of layers available.

In order to access master layers, you need to 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.

The following code 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 2007 Corel Corporation. All rights reserved.