views:

137

answers:

1

I'm making an outlook addon and I'm trying to find a way to see which emails are selected, then be able to work with them through a foreach (or whatever). If this is not possible, is there a way to fetch all items in a folder and get access to that information easily? After that I need to move those items to another folder.

How would I go about doing this?

+2  A: 

You can use the Application.ActiveExplorer method to get the currently active Explorer window (= the thing that displays the list of mails). Then you can use the Explorer.Selection property to obtain the list of selected e-mails.

To move the mails, use the MailItem.Move method.

Heinzi