'How do I programatically open additional mailboxes in Outlook 2010?

Our sales department monitor eachothers mailboxes. Each user has every other users mailboxes open as an additional mailbox.

Whenever a new employee comes along, we have to visit each users' PC to add the additional mailbox(es) to their Outlook profile. This is a waste of resources and is something I'd like to automate.

There must be a way of programmatically doing this via VBA Script, or some such means? Searching on Google hasn't been particularly helpful.



Solution 1:[1]

The Outlook object model (Outlook VBA) doesn't provide anything for editing user profiles. You can try to use a low level API - Extended MAPI. See Administering Profiles and Message Services for more information.

Solution 2:[2]

Since you are using VBA, you cannot uses Extended MAPI (C++ or Delphi).

If using Redemption is an option (I am its author), you can us its RDOSession.Stores.AddDelegateExchangeMailBoxStore method to add a delegate mailbox to the current profile.

If you do not want to log to the profile fist, you can use the ProfMan library (I am also its author) to add a mailbox. See http://www.dimastr.com/redemption/profman_examples.htm#example6

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Astafiev
Solution 2