[AccessD] Export Contacts to Outlook

Rocky Smolin rockysmolin at bchacc.com
Fri Nov 5 11:38:35 CDT 2010


Dear List(s):

My client wants to export contacts from an Access table to a specifically
named contact folder in Outlook.  Got it all working using the folder
picker:

Dim olFolder As outlook.MAPIFolder
Dim olApplication As outlook.Application
Dim olNameSpace As outlook.NameSpace
Dim olContacts As outlook.Items
Dim olContactItem As outlook.ContactItem


    Set olApplication = CreateObject("Outlook.Application")
    Set olNameSpace = olApplication.GetNamespace("MAPI")
    Set olFolder = olNameSpace.PickFolder


But now he wants to hardwire olFolder to a specific folder named
DocketWorks.  And I can't figure out how to set olFolder.  I tried 

Set olFolder = olNameSpace.Folders("DocketWorks")


but that doesn't work.  Played around with some other syntax, searched the
web, no luck.  Does anyone know the correct syntax to set olFolder to a
specific contact folder?

 

MTIA

Rocky Smolin

Beach Access Software

858-259-4334

Skype: rocky.smolin

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 



More information about the AccessD mailing list