Open Other User's Inbox Folder Using VBA

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
 
G

Guest

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
 
Joined
Jul 17, 2013
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top