Previous Document Next Document

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


ShapeRange.RemoveRange

Sub RemoveRange(Range As ShapeRange)

Description

Member of ShapeRange

The RemoveRange method removes a shape range from another shape range.

Parameter
Description
Range
Specifies the shape range to be removed

VBA example

The following VBA example creates two shape ranges and then removes the rectangles from them.

Sub Test()
 Dim s As Shape
 Dim sr As ShapeRange, sr2 As ShapeRange, sr3 As ShapeRange
 Set s = ActiveLayer.CreateRectangle(2, 2, 4, 4)
 s.Fill.ApplyUniformFill CreateRGBColor(255, 0, 0)
 Set s = ActiveLayer.CreateRectangle2(1, 4, 5, 5)
 s.Fill.ApplyUniformFill CreateRGBColor(0, 255, 0)
 Set s = ActiveLayer.CreatePolygon(1, 2, 3, 4, 6)
 Set sr = ActivePage.FindShapes(, cdrRectangleShape)
 Set sr2 = ActivePage.FindShapes(, cdrPolygonShape)
 Set sr3 = ActivePage.FindShapes(, cdrNoShape, True)
 sr3.RemoveRange sr
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.