how to get currently selected email in outlook explorer main window

P

Puneet

how to get currently selected email in outlook explorer main window
Means suppose i just opened the outlook and the very first window of outlook opened.
Now there are two cases
1 I click the inbox folder and select one of the mail.

2 I did not click on the inbox folder .That means no mail is currently selcted.

In both of teh above cases i want to have the email object which is selected.

and if not selected any mail than noting

How i can do that
 
K

Ken Slovak - [MVP - Outlook]

Outlook.Application.ActiveExplorer.Selection. Selection is a collection with
a Count of 0 if nothing is selected. Otherwise iterate the Selection
collection to find out what's selected.
 
Top