HowTo: Find the MAPI folder from Outlook Property page

Add-in Express™ Support Service
That's what is more important than anything else

HowTo: Find the MAPI folder from Outlook Property page
 
Thanasis Boukouvalas




Posts: 40
Joined: 2006-06-17
Hi

If the user has selected the folder A and right clicks folder B and then properties, inside my Outlook folder property page I cannot find the MAPIfolder.

If I use the CurrentFolder of ActiveExplorer, then of course I'm taking folder A.

There is no any property in ADXOlPropertyPage about the folder.
How can I found the correct folder that my property page really belongs to?
Posted 20 Sep, 2006 05:25:35 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Thanasis.

You can use the NamespaceOptionPagesAdd event handler to obtain the folder.

E.g.

private void adxOutlookEvents_NamespaceOptionPagesAdd(object sender, object optionPages, object folder)
{
Outlook.MAPIFolder f = folder as Outlook.MAPIFolder;
MessageBox.Show(f.Name);
}
Posted 20 Sep, 2006 09:03:21 Top