Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : ShapeUngroupAllEx


ShapeUngroupAllEx

Function UngroupAllEx() As ShapeRange

Description

Member of Shape

The UngroupAllEx method ungroups all shapes in a specified group and in any subgroups contained by it. The shapes are returned as a shape range (or ShapeRange object).

VBA example

The following VBA example fills each subgroup with a random RGB color.

Sub Test()
 Dim s As Shape, sg As Shape, sr As ShapeRange
 For Each s In ActivePage.Shapes
  If s.Type = cdrGroupShape Then
   For Each sg In s.Shapes
    If sg.Type = cdrGroupShape Then
     Set sr = sg.UngroupAllEx
     sr.ApplyUniformFill CreateRGBColor(255 * (Rnd() * 255), 255 * (Rnd * 255), 255 * (Rnd * 255))
    End If
   Next sg
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.