PC Review


Reply
Thread Tools Rate Thread

Syntax for linking contacts in Public Folders to Access

 
 
=?Utf-8?B?SXRhbGlhbiBQZXRl?=
Guest
Posts: n/a
 
      17th Mar 2006
Hi,
I'm trying to import specific fields from a contact list in Public
Folders\All Public Folders into Access.
The code I'm using looks something like this:

Sub OpenExchange_Calendar()
Dim ADOConn As ADODB.Connection
Dim ADORS As ADODB.Recordset
Dim strConn As String

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\PetesFolder\Contacts;" _
& "PROFILE=Outlook;" _
& "TABLETYPE=1;DATABASE=C:\WINDOWS\TEMP\;"
.Open
End With

With ADORS
.Open "Select * from Contacts", ADOConn, adOpenStatic, _
adLockReadOnly

.MoveFirst
Do While Not .EOF
Dim i As Long
For i = 0 To ADORS.Fields.Count - 1
Debug.Print ADORS(i).Name, ADORS(i).Value
Next i
.MoveNext
Loop
.Close
End With

Set ADORS = Nothing
ADOConn.Close
Set ADOConn = Nothing

End Sub


However, I am getting an error. I suspect this is due to the syntax of the
string directly after MAPILEVEL.

Is this the case and if so, what should the syntax be?

many thanks,

Pete
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get access to contacts in Public folders Angie M. Microsoft Outlook Installation 5 4th Sep 2008 04:19 PM
Isn't Anyone Else Linking Tasks to Contacts in Public Folders in 0 =?Utf-8?B?bXRiY3Bh?= Microsoft Outlook Contacts 5 18th Sep 2007 05:39 AM
Isn't Anyone Else Linking Tasks to Contacts in Public Folders in 07? mtbcpa Microsoft Outlook Discussion 0 30th Aug 2007 02:29 AM
Webmail - Access to contacts in Public Folders =?Utf-8?B?U2hhd24gUm9taW5l?= Microsoft Outlook Discussion 1 5th May 2006 01:42 AM
linking access 2002 to exchange 2000 public folders Matt Zolly Microsoft Access Database Table Design 0 20th Aug 2003 12:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 PM.