Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Access to Outlook (Access )

    I need to be able to maintain Outlook Contacts from Access. Does anyone know of any code out there that will do this?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access to Outlook (Access )

    Have you looked at
    <A target="_blank" HREF=http://www.helenfeddema.com/CodeSamples.htm>Helen Feddema</A> site?

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    Yeah I did, her code49. The sample Outlook template it included could not be read by Outlook, I got "Not a valid property of this object" errors in her code when she tried to use the Outlook Object she defined, and even if it could work, it still only dumps the Access table into Outlook. There is no means to detect if a record already exists to be able to update it rather than create a duplicate.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access to Outlook (Access )

    The version of Office you are useing makes a considerable difference in whether Outlook OLE Automation works well or not. Outlook 2000 is much more friendly than 98 - but neither is a piece of cake when it comes to working with Access. The problem is that Outlook basically uses a flat file with delimiters to store all of the data about a contact. That said, the task is not insurmountable.

    You have to do it all in code, and it is fairly complex. The process essentially involves creating Add, Edit and Delete processes, and the code to get and display the various contact information in forms. We are in the process of doing something similar using Exchange Server. I believe there is some information about how to tackle this in the Getz et al Developers Handbook, and there are several white papers available in the MS knowledge base. Bottom line - it isn't trivial.
    Wendell

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    Unfortunately there is nothing in Dev. Handbook (97 version anyway). I've seen other code for adding a contact that worked, but I haven't seen any code that worked (the one I saw didn't work) for checking to see if an entry in Contact file already exists. Also, in your experience, can an Outlook Contact be updated, or is it better to delete/add?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access to Outlook (Access )

    Mark, which version of Outlook are you using? For everything prior to Outlook 2000, the Outlook scripting language was VBS, not VBA, so that might be where you're running into problems. There were articles in Access-VB-SQL Advisor (<A target="_blank" HREF=http://www.advisor.com>http://www.advisor.com</A>) and Smart Access (<A target="_blank" HREF=http://www.smartaccessnewsletter.com>http://www.smartaccessnewsletter.com</A>) on Access and Outlook in the earlier versions, so you might try looking through their indexes, although you'll have to buy the articles unless you have the mags at home. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access to Outlook (Access )

    <A target="_blank" HREF=http://www.outlookexchange.com/articles/home/outlooklinks.asp>This site</A> Might be worth a look.

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access to Outlook (Access )

    BTW, Looking at your problem simply. Could you export the Outlook contacts, work on them in Access and then put them back?

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access to Outlook (Access )

    You are correct about not being able to check to see if the person already exists, but there is a trick. To make sure you have consistency, you only allow updating from Access - i.e. no updates from Outlook. Second, you use one of the spare Outlook "fields" to store a unique identifier, and you use that as your look-up source. In other words, you use Access to check for duplicates in its tables before you ever start an OLE session with Outlook. I seem to remember that you use Office 97 primarily, and that limits what you can do from Outlook anyhow.

    As a starter, you might look at Q168095 on the Knowledge base. There are some other white papers that go into more detail that I haven't been able to locate, but I'll dig later today and see if I can't find them.
    Wendell

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    Just checked (I don't routinely use Outlook), and I'm using Outlook97. In looking at Helen's documentation, she said her template file was for Outlook98 (is there such a thing) and Outlook2000. Anyway, there are still other problems with the code.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    Thanks. I think I may have gotten the info there from another source, but I'll look at it more closely.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  12. #12
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    >>BTW, Looking at your problem simply. Could you export the Outlook contacts, work on them in Access and then put them back?<<

    The information in Access are the Customers in an Invoicing application, so the info has to reside there, otherwise I lose referential integrity. I can add a Customer to Contacts, but once it is there I either have to be able to update it or just delete it and re-add (though I don't know what consequences of this are).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  13. #13
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    >>You are correct about not being able to check to see if the person already exists, but there is a trick<<

    I'm wasn't sure about checking for duplicates in Outlook. I did have some code I got from somewhere else that purported to check for duplicates, but it is apparent that the check didn't work because I was able to consistently add duplicates from Access to Outlook. I am using Office97, but my client is using OfficeXP, if that would make a difference in what I can do. I'l check-out those MSKB references to see what I can understand. Thanks.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  14. #14
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access to Outlook (Access )

    Yes, Outlook98 was an in-between version that cured some of the Outlook97 problems, but of course had a different object library name. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15> I would expect any code for Outlook 2000 to use VBA rather than VBS, but if she's using the object libraries, there's a lot you can do with Outlook without having to resort to VBS. Unfortunately, it isn't as much as you might wish, and any given version exposes different methods and properties, so the code probably isn't at all backward compatible with 97. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> She used to have 97 stuff on her site as well, so you might be able to find something more suitable if you look for it.
    Charlotte

  15. #15
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Access to Outlook (Access )

    >>Yes, Outlook98 was an in-between version that cured some of the Outlook97 problems, but of course had a different object library name. <<

    Of course! why make this simple! It looks like I'll have to follow through on my threat to load-in Office2000, now that I've gotten a friend to use RoadRunner to download all new latest SR and SP. I try to stay no more than 1 release behind.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •