Previous Document Next Document
Shape.Layer

Property Layer As Layer

Member of Shape

The Layer property returns or sets the document layer on which the active shape resides.

The following code example moves all rectangles to a separate layer:

Sub Test() 
 Dim s As Shape 
 Dim lr As Layer 
 Set lr = ActivePage.CreateLayer("Rectangles") 
 For Each s In ActivePage.FindShapes(Type:=cdrRectangleShape) 
  s.Layer = lr 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.