Results 1 to 15 of 15
  1. #1
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31

    Export contact information from Outlook to Access


    I need to export "date of birth" and "Picture" (together with other fields) from my Outlook contacts into Access. The recommended procedure does not export these data.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The procedure is the Access import/link wizard?

    This link has code for export of data from Access to Outlook contacts http://support.microsoft.com/kb/290658

    Not finding anything about pulling data from Outlook contacts.

    Everything else I find is code behind Outlook to send data to Access.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    One option may be to use Access' wizard to create and save an import procedure. You can run the wizard once to create a new table. After this you can rename your new table and run the wizard again. When you run the wizard the second time, select the option to append an existing table and SAVE the import process with a meaningful name. With that, you can use the name of your saved import procedure in VBA.

    I think the VBA is this....
    DoCmd.RunMacro "ProcedureName"
    http://msdn.microsoft.com/en-us/libr...ffice.14).aspx

  4. #4
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    Hi June7. There are routines for pulling data from Outlook to Access, for example described in Access 2010 Step by Step (p. 269). The problem is that the routine only copy part of the Outlook data.
    Erik

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I just reviewed that book. Decent introduction to Access features but useless for programming. We already know there is an import/export routine available with a wizard and understand the wizard is inadequate. That book doesn't have a single line of VBA code. Doesn't even get into macros.

    Do you want code behind Outlook to push data or behind Access to pull data?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    June7. I am also frustrated over that book. The alternative for me is Access 2010 Inside Out, but that one is to voluminous for the sort of introduction I need. Somebody has to come up with a better solution. Do you have any recommandations for a compact course/book... ?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Doubt there is such a thing as a 'compact' programming reference.

    I've never used any Access programming books but these look interesting:

    Access 2010 Programming By Example With VBA, XML, And ASP by Julitta Korol

    or

    Access 2010 Bible by Michael R. Groh

    or

    Access 2010 Programmer's Reference by Teresa Henning, et. al.

    or

    Mastering VBA for Office 2010 by Richard Mansfield

    I have no idea if any of them will have even a clue about what you want.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    Thank you. I will check these books at our excellent Library. My ambition is to understand sufficient of Access to make my own applications. I beleive Access will be a valuable tool for keeping order in my universe . Perhaps you can be my mentor.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Consider the entire forum a mentor.

    So far, this article has the most code I've seen http://www.icodeguru.com/database/Pr...l/LiB0065.html

    I tried the procedure for Enumerating Items in the Contacts Folder but it bombs on the For loop.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    I will consider the entire forum as a mentor, but it is always good to have a anchor person. I will find my anchor.

    When you find out how to tackle the problem I would be extremely interested to see how you have solved it. I am sure that would give me a real boost, and give direction to my efforts to be GOOOOOOD.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Ooops, I probably edited my post after you read it, look again.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I was able to export a picture to a folder named Test in my C drive by replacing the following code that was provided in the example June linked to.
    Code:
        Debug.Print myItem.FirstName, myItem.LastName, _
            myItem.Email1Address, myItem.Birthday

    THis is the code I came up with

    Code:
    If myItem.HasPicture Then
    Dim objPic As Object
    Dim objFind As Object
    Dim strContName As String
    Dim strObjName As String
    Dim strExtension As String
    strContName = myItem.FirstName & "_" & myItem.LastName
    For Each objFind In myItem.Attachments
    If objFind.Class = 5 Then   'Not sure if this is really catching only pictures
    strObjName = objFind
    strExtension = Mid(strObjName, InStrRev(strObjName, "."))
    Set objPic = myItem.Attachments.Item(strObjName)
    objPic.SaveAsFile ("C:\Test\" & strContName & strExtension) 'May want to add code and check for existing file
    End If 'Class 5
    Next objFind
    End If 'haspicture

  13. #13
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    Thank you both. This forum is full of mentors. I see that one of my first objectives will be to teach myself code. How to start? Where do I start?

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    erikl1 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    31
    Thanks June7. I love this forum. Now I am getting some structure on my work. Have a Nice New Year celebration. See you NeXT year.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Link existing names in Access DB to Outlook contact
    By mikejoka in forum Import/Export Data
    Replies: 1
    Last Post: 08-30-2013, 12:24 PM
  2. add to Outlook Contact
    By sdel_nevo in forum Programming
    Replies: 2
    Last Post: 06-10-2013, 01:07 AM
  3. Replies: 8
    Last Post: 08-06-2012, 10:23 PM
  4. Replies: 8
    Last Post: 06-02-2012, 01:27 AM
  5. Replies: 0
    Last Post: 06-19-2007, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums