Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

connecting to outlook folders

Posted on 2002-04-06
6
491 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 100 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

856 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