Previous Document Next Document
Shape.Shapes

Property Shapes As Shapes

Member of Shape

The Shapes property returns a collection of Shapes.

This property is valid only for a group shape. The returned collection contains all shapes that are part of the group

The Shapes property returns a read-only value.

The following code example converts all uniform fill colors to grayscale:

Sub Test() 
 ConvertFills ActivePage.Shapes 
End Sub 
Private Sub ConvertFills(ss As Shapes) 
 Dim s As Shape 
 For Each s In ss 
  If s.Type = cdrGroupShape Then 
   'If this is a group shape, then all the shapes in this group 
   'are processed by calling the function recursively. 
   ConvertFills s.Shapes 
  Else 
   If s.Fill.Type = cdrUniformFill Then 
    s.Fill.UniformColor.ConvertToGray 
   End If 
  End If 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.