Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.RemoveFromContainer


ShapeRange.RemoveFromContainer

Sub RemoveFromContainer([Level As Long])

Description

Member of ShapeRange

The RemoveFromContainer method removes all the shapes in a shape range from their PowerClip containers.

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

Parameter
Description
Level
Specifies the lowest level from which you want to remove the shapes. The shapes are removed from this level and all levels above them. This parameter is optional, and its default value is 0.

VBA example

The following VBA example removes all shapes from their PowerClip container.

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 2013 Corel Corporation. All rights reserved.