Example

This example selects the entire screen, displays a message box, and then removes the selection when you click OK.

Sub SelectionDemo()

 With Session

  .SetSelectionStartPos 1, 1

  .ExtendSelectionRect 26, 80

  MsgBox "Click OK to clear the selection."

  .ClearSelection

 End With

End Sub