Compartir a través de


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.

Version Information

Version Added: Outlook 2010

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

Concepts

Selection Object Members

How to: Obtain and Enumerate Selected Conversations

Selection Object