I have Outlook 2000 set for Internet email and want to access my calendar
items via ADO
I have found the code below from the MS site but I get the error "MAPI
folder or Address book not found"
I am using VB6
Any ideas
Steve
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=Mailbox - Personal Folders|;" _
& "PROFILE=Microsoft Outlook Internet Settings;" _
& "TABLETYPE=0;DATABASE=C:\WINDOWS\TEMP\;"
.Open
End With
With ADORS
.Open "Select * from Calendar", 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
Veign - 30 Aug 2004 16:34 GMT
Did you try the DAO version that MS has the examples in?

Signature
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--
> I have Outlook 2000 set for Internet email and want to access my calendar
> items via ADO
[quoted text clipped - 35 lines]
> ADOConn.Close
> Set ADOConn = Nothing