connecting to outlook folders
Posted on 2002-04-06
I found the following article on MS KB but I can't see how it'll work. first I don't have an icon in control panel called mail tool. nor do I have a tab called delivery.
How do I get this to work.?
MS KB Article
Click Start , point to Settings , and then click Control Panel .
In Control Panel, open the Mail tool.
Click the Delivery tab to see the list of available mailboxes. Your mailbox name is in the Deliver new mail to the following location box.
In an Access database, create a new module, and then paste or type the following code.
NOTE : In the connection string, change the name James Smith to your mailbox name, and make sure the path to the Temp folder is correct for your system. Keep in mind that the spaces, the minus sign, and the vertical bar character are required in the string.
Dim ADOConn As ADODB.Connection
Dim ADORS As ADODB.Recordset
Dim strConn As String
Set ADOConn = New ADODB.Connection
Set ADORS = New ADODB.Recordset
.Provider = "Microsoft.JET.OLEDB.4.0"
.ConnectionString = "Exchange 4.0;" _
& "MAPILEVEL=Mailbox - James Smith|;" _
& "PROFILE=MS Exchange Settings;" _
.Open "Select * from Contacts", ADOConn, adOpenStatic, _
Debug.Print ADORS(0).Name, ADORS(0).Value
Debug.Print ADORS(1).Name, ADORS(1).Value
Set ADORS = Nothing
Set ADOConn = Nothing