Object Model Reference : Classes : S : Shape : Methods : Shape.UngroupAll |
Sub UngroupAll()
Member of Shape
The UngroupAll method ungroups all shapes in a given group and in any subgroups contained by it.
The following VBA example ungroups any nested groups on the active page. Top-level groups remain unchanged, while nested groups are ungrouped.
Sub Test() |
Dim s As Shape, sg As Shape |
For Each s In ActivePage.Shapes |
If s.Type = cdrGroupShape Then |
For Each sg In s.Shapes |
If sg.Type = cdrGroupShape Then |
sg.UngroupAll |
End If |
Next sg |
End If |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.