Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.Remove |
Sub Remove(Index As Long)
Member of ShapeRange
The Remove method removes a specified shape from a shape range.
• |
The specified shape is removed only from the specified shape range and not
from any other ranges of which it may be a part.
|
• |
The specified shape is not deleted from the document.
|
Parameter
|
Description
|
Index
|
Specifies the index number of the shape to be removed from the shape range
|
The following VBA example moves the selected rectangles by 1" to the right. Any other selected shapes that are not rectangles are not moved.
Sub Test() |
Dim sr As ShapeRange |
Dim i As Long |
Set sr = ActiveSelectionRange |
For i = sr.Count To 1 Step -1 |
If sr(i).Type <> cdrRectangleShape Then sr.Remove i |
Next i |
sr.Move 1, 0 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.