Previous Document Next Document
ShapeRange.RemoveFromContainer

Sub RemoveFromContainer([Level As Long])

Member of ShapeRange

The RemoveFromContainer method removes all of the shapes in the range from their PowerClip container.

If there are several nested PowerClip objects, you can remove the shapes from several containers at one time by specifying the Level parameter value.

Parameters
Description
Level
Specifies the lowest level from which you want to remove a shape. The shape is removed from this level and all levels above it.
This parameter is optional, and its default value is 0.

The following code example removes all of the shapes from their PowerClip containers:

Sub Test() 
 Dim s As Shape 
 Dim p As PowerClip 
 On Error Resume Next 
 For Each s In ActivePage.Shapes 
  Set p = Nothing 
  Set p = s.PowerClip 
  If Not p Is Nothing Then 
   ActiveDocument.ClearSelection 
   p.Shapes.All.RemoveFromContainer 
  End If 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.