Tiffosi2006
Registered User.
- Local time
- Today, 13:55
- Joined
- Nov 7, 2006
- Messages
- 15
Hi,
I have been searching the forum all day and cant find anything on this (all relate to linking tables or private contacts)
I have an access database that i want to link up to an outlook public folder. The public folder is located in: Public folders/all public folders/your department/your section (and then there is a contacts folder held here called contacts )
I have the following code which will connect to my personal contacts but i cant work out how to connect to the above!! Help is VERY much appreciated!
Function ImportContactsFromOutlook()
' Set up DAO objects (uses existing "tblOutlook" table)
' Set a reference to the Microsoft Outlook 10.0 Object Library and the Microsoft DAO 3.6 Object Library.
Dim rst As DAO.Recordset
Dim NumRec As Long
Set rst = CurrentDb.OpenRecordset("tblContacts")
' Set up Outlook objects.
Dim ol As New Outlook.Application
Dim olns As Outlook.Namespace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.ContactItem
Dim objItems As Outlook.Items
Dim Prop As Outlook.UserProperty
Set olns = ol.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)
Thanks in advance,
Kev
I have been searching the forum all day and cant find anything on this (all relate to linking tables or private contacts)
I have an access database that i want to link up to an outlook public folder. The public folder is located in: Public folders/all public folders/your department/your section (and then there is a contacts folder held here called contacts )
I have the following code which will connect to my personal contacts but i cant work out how to connect to the above!! Help is VERY much appreciated!
Function ImportContactsFromOutlook()
' Set up DAO objects (uses existing "tblOutlook" table)
' Set a reference to the Microsoft Outlook 10.0 Object Library and the Microsoft DAO 3.6 Object Library.
Dim rst As DAO.Recordset
Dim NumRec As Long
Set rst = CurrentDb.OpenRecordset("tblContacts")
' Set up Outlook objects.
Dim ol As New Outlook.Application
Dim olns As Outlook.Namespace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.ContactItem
Dim objItems As Outlook.Items
Dim Prop As Outlook.UserProperty
Set olns = ol.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)
Thanks in advance,
Kev