Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Inboxes and Excel Macros

Status
Not open for further replies.

jisoo22

Programmer
Apr 30, 2001
277
US
Hello!

I have an excel macro that imports information from an email in the Outlook inbox. Unfortunately I have 3 different inboxes and the macro seems to open up the first inbox it sees. Is there any way to program it to find the inbox I want it to open?

Thanks,
Jisoo22
 
Also, here is a bit of the VBA I used to have excel automatically open up Outlook and it's inbox:

Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNamespace.GetDefaultFolder(6)
myFolder.Display
Set myItem = myFolder.Items(1)
myItem.Display


Does anyone know how I can adjust it to open a different inbox? (To be specific, there is more then one "personal folders" folder on my list. Or at least that's my interpretation since there is more then 1 folder on the same primary level of the directory tree.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top