If the email address for mailbox 2 is "(E-Mail Removed)" then it would go
something like this in C#.
// app == Outlook.Application, ns == NameSpace
Outlook.Recipient recip =
(Outlook.Recipient)ns.CreateRecipient("(E-Mail Removed)");
recip.Resolve;
Outlook.MAPIFolder folder = (Outlook.Folder)ns.GetSharedDefaultFolder(recip,
Outlook.OlDefaultFolders.olFolderInbox);
or you can get the ns.Folders collection and look for one with a caption of
"Mailbox - User 2" and from there get that Folder's Folders collection and
look for one named "Inbox".
--
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
"rob" <(E-Mail Removed)> wrote in message
news:B2C15D06-E349-4711-9634-(E-Mail Removed)...
> Ken,
>
> Thanks for the suggestion.
>
> Do you have a sample to create a recipient object that
> uses GetSharedDefaultFolder in c#?
>
> I have two mailboxes set in outlook
> 1) Mailbox - username1 -- default mailbox
> 2) Mailbox - username2
>
> I should create a recipient object that points to Mailbox - username2
> and lets assume an userid username2 and password of 'password'.
>
> I should point to Mailbox - username2 and loop through the folders
> collection to get to inbox and save the email messages to a *.msg file.
>
> Thanks
> Rob