Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

connecting to outlook folders

Posted on 2002-04-06
6
Medium Priority
?
497 Views
Last Modified: 2010-05-19
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.


Sub OpenExchange_ContactFolder()
    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 - James Smith|;" _
                            & "PROFILE=MS Exchange Settings;" _
                            & "TABLETYPE=0;DATABASE=C:\WINDOWS\TEMP\;"
        .Open
    End With
   
    With ADORS
        .Open "Select * from Contacts", ADOConn, adOpenStatic, _
               adLockReadOnly
        .MoveFirst
            Debug.Print ADORS(0).Name, ADORS(0).Value
            Debug.Print ADORS(1).Name, ADORS(1).Value
        .Close
    End With
   
    Set ADORS = Nothing
    ADOConn.Close
    Set ADOConn = Nothing

End Sub
0
Comment
Question by:SE081398
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:ornicar
ID: 6924350
This code seems to work with Exchange, which fortunately you don't have installed. ;-)

With Access 2000, you can directly link Outlook tables.
With Access 97, there is a wizard you can download here:

Import and Link Exchange/Outlook Wizards for Access 97
http://office.microsoft.com/downloads/9798/Wzmapi.aspx

If you prefer to tweak with code, you will have to open the tables a different way, by using the outlook application object.



0
 
LVL 3

Author Comment

by:SE081398
ID: 6924484
I'm using 2000, so the 97 mapi addin won't work.  Do you have some code that works with 2000.  I'm looking for some samples that I can play with to get the idea.  I've found a few others since posting this Q and I'm looking through them all.  Your input would be much appreciated.

 

0
 
LVL 9

Accepted Solution

by:
ornicar earned 400 total points
ID: 6924825
With Access 2000, you can directly link Outlook tables:
File menu, get external data, link tables.
Choose Outlook() for the type of file.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Author Comment

by:SE081398
ID: 6925454
well that was easy hey.  thanks

would you happen to have any code that would do this as well.

 
0
 
LVL 9

Expert Comment

by:ornicar
ID: 6925673
Take a look at these EE questions, all related to manage Outlook data from Access:

http://www.experts-exchange.com/questions/Q.20228467.html
http://www.experts-exchange.com/questions/Q.20222514.html
http://www.experts-exchange.com/questions/Q.20168793.html
http://www.experts-exchange.com/questions/Q.20157857.html
http://www.experts-exchange.com/questions/Q.20151746.html

If you search for 'Outlook' in the knowledge base, you can see that there are a lot of unanswered questions. I feel its because it is easier to solve the problem by the other end: Search for 'database' or something else in the Outlook topic.
0
 
LVL 3

Author Comment

by:SE081398
ID: 6925816
Thanks.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question