![]() |
Non-default Mailbox
I have code (see below) that accesses the default mailbox InBox. I can't
figure out how to set to a non-default mailbox. Somehow I think I am supposed to use the Folders collection, but I can get it to work. Any suggestions? Thanks. Set olMAPI = GetObject("", "Outlook.Application").GetNamespace("MAPI") Set curInbox = olMAPI.GetDefaultFolder(olFolderInbox) |
Non-default Mailbox
So I guess I am suppsoed to use GetSharedDefaultFolder, but that wants to use
CreateRecipient, but the recipient already exists. Or does it just check to see if the recipient exists? Form the outstanding Microsoft documentation, it is impossible to tell. Thanks. Any hints will be greatly appreciated. "John Lane" wrote: I have code (see below) that accesses the default mailbox InBox. I can't figure out how to set to a non-default mailbox. Somehow I think I am supposed to use the Folders collection, but I can get it to work. Any suggestions? Thanks. Set olMAPI = GetObject("", "Outlook.Application").GetNamespace("MAPI") Set curInbox = olMAPI.GetDefaultFolder(olFolderInbox) |
Non-default Mailbox
You can supply any valid Recipient object. You must somehow create the
Recipient object of course. If the non-default mailbox is opened as part of the profile then you can use the Folders collection of the NameSpace object and iterate that collection until you find the mailbox you want. That won't work if the store isn't opened as part of the Outlook profile however. -- 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 "John Lane" wrote in message ... So I guess I am suppsoed to use GetSharedDefaultFolder, but that wants to use CreateRecipient, but the recipient already exists. Or does it just check to see if the recipient exists? Form the outstanding Microsoft documentation, it is impossible to tell. Thanks. Any hints will be greatly appreciated. "John Lane" wrote: I have code (see below) that accesses the default mailbox InBox. I can't figure out how to set to a non-default mailbox. Somehow I think I am supposed to use the Folders collection, but I can get it to work. Any suggestions? Thanks. Set olMAPI = GetObject("", "Outlook.Application").GetNamespace("MAPI") Set curInbox = olMAPI.GetDefaultFolder(olFolderInbox) |
All times are GMT +1. The time now is 08:31 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com