|   |   | Object Model Reference : Classes : D : Document : Methods : Document.Selection | 
Function Selection() As Shape
Member of Document
The Selection property returns a special selection object that represents all selected shapes in the document.
 
| • | You can use a Shapes collection to access each individual selected shape. You 
can work with the selection object in almost the same way as you would with 
a regular shape: for example, you can move it, delete it, or apply a fill or outline 
to it.
 | 
The following VBA example sets the selected objects to the lower-left corner of the page and stretches them so they fit in a box that is 3" × 3".
| Sub Test() | 
|  Dim s As Shape | 
|  Set s = ActiveDocument.Selection | 
|  If s.Shapes.Count = 0 Then | 
|   MsgBox "No Object Selected" | 
|   Exit Sub | 
|  End If | 
|  ActiveDocument.ReferencePoint = cdrBottomLeft | 
|  s.SetPosition 0, 0 | 
|  s.SetSize 3, 3 | 
| End Sub | 
|   |   |   | 
Copyright 2013 Corel Corporation. All rights reserved.