Previous Document Next Document
Shape.RemoveFromSelection

Sub RemoveFromSelection()

Member of Shape

The RemoveFromSelection method removes a shape from a selection. This method does not work if the shape is a selection shape.

The following code example removes all text objects from the selection:

Sub Test() 
 Dim sr As ShapeRange 
 Dim s As Shape 
 Set sr = ActiveDocument.SelectionRange 
 For Each s In sr 
  If s.Type = cdrTextShape Then s.RemoveFromSelection 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.