Finding Exchange Mailbox from COM Add-in?

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I am writing an Outlook XP/2003 COM Add-in in C# (Visual Studio .NET 2003).

I would like to be able to find the top-level Exchange folder called
"Mailbox - (name)". Some users have Exchange as their email provider, but
have their email delivered to a local Personal Folders .pst file, so I can't
look at the default Inbox folder's parent property to find the Exchange
mailbox.

Is there any way to find this folder using the Outlook object model or
perhaps Redemption?

Michael
 
It would depend on whether or not the user had the Exchange mailbox in their
profile, opened when they opened Outlook. If they did you get
NameSpace.Folders and iterate each top level folder in that collection to
find "Mailbox". If not then all you could get would be the Inbox.Parent
folder.
 
And if you have two mailboxes open with a .pst file as the default delivery
point, you'll need to compare the user name (Namespace.CurrentUser) with the
Mailbox - somebody name.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top