Previous Document Next Document

Object Model Reference : Classes : S : Shape : Properties : Shape.Layer


Shape.Layer

Property Layer As Layer

Description

Member of Shape

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

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.