Object Model Reference : Classes : S : Shape : Properties : Shape.Shapes |
Property Shapes As Shapes
Member of Shape
The Shapes property returns a Shapes collection.
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 VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.