ActiveExplorer is the active object in a folder view. Selected items in ActiveExplorer are in the Selection collection. Once you have the item you can access all its properties and its attachments.
Something like this:
private Outlook.Selection colSelect; private Outlook.MailItem m_mail;
if (this.Application.ActiveExplorer() != Null) { colSelect = this.Application.ActiveExplorer().Selection;
try { m_mail = (Outlook.MailItem) colSelect[1]; // whatever } catch { }
// whatever }
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
<neoret[ at ]gmail.com> wrote in message news:1157626318.835124.48960[ at ]b28g2000cwb.googlegroups.com...
[Quoted Text] > Hi there :) > > I have a button in Outlook which allows the user to save a mail item to > an external archiving system. > > If the user presses this button I need to check wether or not he has a > mail-item "active". By this I mean that the user has selected a mail in > a spesific folder that he wants to archive. > > Furthermore I need to get hold of that spesific mail item with > belonging attachements. > > When reading in documentations, articles and examples I can only see > how you create folders and items - not how to get a reference to an > existing one. > > I write my code in C#, and has a shared add-in. This button is > displayed in every office-application. > > Thank's a lot for any contribution :) >
|