![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hello Outlook Group:
I am trying to reference a CUSTOM user folder at the same level as all the other folders: For example, I have a folder called MyEmails that appears in the Outlook tree as follows: Calendar Contacts Deleted Items Drafts Inbox MyEmails The VBA code I'm using from Access works for the Inbox, but fails on the MAPI setup of the MyEmails Folder: Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFold erInbox) Set MyEmailFolder = OlApp.GetNamespace("Mapi").Folders("MyEmail") I don't want to the the GetDefaultFolder because it isn't one. Does anyone know the code to create the Namespace for "MyEmail"? Thanks, Rich Locus -- Rich Locus Logicwurks, LLC |
Ads |
#2
|
|||
|
|||
![]()
I finally came up with the code to do this... I had to refer to the Parent
directory of the Inbox: Set MyEmailFolder = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFold erInbox).Parent.Folders("MyEmail") -- Rich Locus Logicwurks, LLC "Rich Locus" wrote: Hello Outlook Group: I am trying to reference a CUSTOM user folder at the same level as all the other folders: For example, I have a folder called MyEmails that appears in the Outlook tree as follows: Calendar Contacts Deleted Items Drafts Inbox MyEmails The VBA code I'm using from Access works for the Inbox, but fails on the MAPI setup of the MyEmails Folder: Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFold erInbox) Set MyEmailFolder = OlApp.GetNamespace("Mapi").Folders("MyEmail") I don't want to the the GetDefaultFolder because it isn't one. Does anyone know the code to create the Namespace for "MyEmail"? Thanks, Rich Locus -- Rich Locus Logicwurks, LLC |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I refer to user field in VB | Bev Kaufman | Outlook and VBA | 1 | April 23rd 10 11:22 AM |
How to refer to a given Outlook Message from another MicrosoftApplication | Paul Schrum | Outlook and VBA | 1 | January 18th 08 07:41 AM |
Moving a Custom Form from folder to folder in Outlook 2007 | koops2121 | Outlook - Using Forms | 8 | September 25th 07 12:14 AM |
Refer original Item from new form | sriramna | Outlook - Using Forms | 9 | March 26th 07 04:56 PM |
refer to "To" Field in Code | Joel | Outlook and VBA | 10 | December 7th 06 03:35 AM |