Object Model Reference : Classes : S : Shape : Properties : Shape.Layer |
Property Layer As Layer
Member of Shape
The Layer property returns or specifies the document layer on which the active shape resides.
The following VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.