Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / August 2004



Tip: Looking for answers? Try searching our database.

Accessing Outlook2K Calendar items using ADO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
steve - 29 Aug 2004 07:45 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.