Selection.GetSelection method (Outlook)

Returns a Selection object that contains the kind of objects specified by the SelectionContents parameter, and that are currently selected in the active explorer.

Syntax

expression. GetSelection( _SelectionContents_ )

expression A variable that represents a Selection object.

Parameters

Name Required/Optional Data type Description
SelectionContents Required OlSelectionContents Specifies the kind of objects in the selection to return.

Return value

A Selection object that contains the specified kind of objects that are selected in the active explorer.

Remarks

Calling GetSelection with olConversationHeaders as the argument returns a Selection object that has the Location property equal to OlSelectionLocation.olViewList.

If the current view is not a conversation view, or, if Selection.Location is not equal to OlSelectionLocation.olViewList, calling GetSelection with olConversationHeaders as the argument returns a Selection object with Selection.Count equal to 0.

See also

Selection Object

How to: Obtain and Enumerate Selected Conversations

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.