A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Link Access Table to Exchange Public Folder Contacts



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 29th 06, 08:05 PM posted to microsoft.public.outlook.contacts
Brian
external usenet poster
 
Posts: 1
Default Link Access Table to Exchange Public Folder Contacts

Greetings all! And thanks for s-o-o many fine solutions over the years.
Unfortunately, with hours of searching, I can't achieve success.

Background: Access 2003 & Outlook 2003 Pro SP2, running XP Pro
The Outlook contacts reside on a third-party-hosted Exchange server.

I am seeking a customer solution that will enable an Access DB to link
dynamically to a contacts folder named "TeetersCustomerContacts
in 'Public Folders' under 'All Public Folders' under a 'TPI" folder'.

eg: Public Folders| All Public Folders/TPI/TeetersCompanyContacts

The following code connects (or at least does not break).

QUESTIONS:

1) How do I populate a recordset using 'TeetersCompanyContacts'?

2) How do I create a table (ideally a temp table?) of this data?

Thank you so much for any assistance.

Brian M
-------------------------
Sub OpenExchange_CompanyContacts()
Dim ADOConn As ADODB.Connection
Dim ADORS As ADODB.Recordset
Dim strConn As String

'====== Using as test code only to confirm the nested folder names are
correct
Dim ns As Outlook.NameSpace
Dim fld As Outlook.MAPIFolder
Dim myOutlook As Outlook.Application
Set myOutlook = New Outlook.Application
Set ns = myOutlook.GetNamespace("MAPI")
For Each fld In ns.Folders("Public Folders").Folders("All Public
Folders").Folders("TPI").Folders("TeetersCompanyCo ntacts").Folders
Debug.Print fld.Name
Next
'myOutlook.Quit
'Set myOutlook = Nothing
'====== End test of folder names

Set ADOConn = New ADODB.Connection
Set ADORS = New ADODB.Recordset

With ADOConn
.Provider = "Microsoft.JET.OLEDB.4.0"
.ConnectionString = "Exchange 4.0;" _
& "MAPILEVEL=Public Folders|All Public
Folders\TPI\TeetersCompanyContacts;PROFILE=Test;TA BLETYPE=0;DATABASE=C:\TEMP\"
_
& "PROFILE=MS Exchange Settings;" _
& "TABLETYPE=0;DATABASE=C:\WINDOWS\TEMP\;"
.Open
End With
' With ADORS

' .Open "Select * from TeetersCompanyContacts;", ADOConn,
adOpenStatic, _
' adLockReadOnly
' .MoveFirst
' Debug.Print ADORS(3).Name, ADORS(3).Value
' Debug.Print ADORS(10).Name, ADORS(10).Value
' .Close
' End With

Set ADORS = Nothing
ADOConn.Close
Set ADOConn = Nothing

End Sub


Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Public Folder Contacts not appearing [email protected] Outlook - General Queries 3 February 24th 06 10:55 AM
Table View Contacts Gridline lopnorth Outlook - General Queries 0 February 23rd 06 03:56 PM
Cannot search contacts in public folder jaff Outlook - Using Contacts 0 January 11th 06 06:20 PM
public contacts folder in favorites is empty rcolving Outlook - Using Contacts 0 January 10th 06 03:38 PM
Making the Public Folder Contacts the Primary Contacts?? Roman B. Outlook - Using Contacts 1 January 9th 06 10:52 AM


All times are GMT +1. The time now is 10:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.