Open Other User's Inbox Folder Using VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am using Outlook/Exchange 2003 and want to create VBA code to
automatically open another user's Inbox. I have editor access to the other
account.

I would like to have code that opens the other user's inbox in the existing
window and another similar process that opens the other user's inbox in a new
window.

Any ideas as to whether or not this is possible?

Your assistance is greatly appreciated.

Thanks,
Lor
 
The Outlook Object Model makes this very easy:

Dim myOlApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myRecipient As Outlook.Recipient
Dim myFolder As Outlook.MAPIFolder

Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient("Some User")
myRecipient.Resolve
If myRecipient.Resolved Then
Set myFolder = myNamespace.GetSharedDefaultFolder(myRecipient,
olFolderInbox)
myFolder.Display 'Will launch new window
End If
 
I know this was posted a long time ago but thank you for putting up this bit of code. Works like a treat, in Outlook 2010

Ron
 
Back
Top