Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.UngroupAll


Shape.UngroupAll

Sub UngroupAll()

Description

Member of Shape

The UngroupAll method ungroups all shapes in a given group and in any subgroups contained by it.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.