Previous Document Next Document

Object Model Reference : Classes : A : Application : Properties : Application.ActiveSelection


Application.ActiveSelection

Property ActiveSelection As Shape

Description

Member of Application

The ActiveSelection property returns the active selection in the active document.

The ActiveSelection property returns a read-only value.

VBA example

The following VBA example colors the selected shapes green, if the shape selected is an ellipse.

Sub SelectionActive()
 Dim s As Shape
 For Each s In ActiveSelection.Shapes
  If s.Type = cdrEllipseShape Then
   s.Fill.UniformColor.CMYKAssign 100, 0, 100, 0
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.