views:

184

answers:

0

Using the following code:

        Microsoft.Office.Interop.Outlook._Application _OutlookApp = new Microsoft.Office.Interop.Outlook.ApplicationClass();            
        Microsoft.Office.Interop.Outlook._NameSpace _mapiNameSpace = _OutlookApp.GetNamespace("MAPI");            
        Microsoft.Office.Interop.Outlook.Recipient recipient = _mapiNameSpace.CreateRecipient("[email protected]");
        recipient.Resolve();            

        if (recipient.Resolved)
        {
            Microsoft.Office.Interop.Outlook.MAPIFolder mapiInbox = _mapiNameSpace.GetSharedDefaultFolder(recipient, OlDefaultFolders.olFolderInbox);                             

        }

The line with GetSharedDefaultFolder belows up with the following error:

Microsoft Exchange is not available. Eithr there are network problems or the Excahgne computer is down for maintenance.

If I change it to:

_mapiNameSpace.GetDefaultFolder(OlDefaultFolders.olFolderInbox);

It works grabbing my personal Inbox. I have permission to the [email protected] account and can open it directly in Outlook.