Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access to Outlook Automation (2000 (SP3))

    I have written a Sub (courtesy of Smith and Sussman - Beginning Access 2000 VBA) to generate email messages in Outlook from Access. I will be using this for a directory project to send out the data as we have input it for proofreading by the person who is listed. Essentially it is an electronic mail merge.

    The sub is working fine, however, when I set it running, Outlook kindly pops up a message telling me that another program is generating an email message and it might be a virus, yadda, yadda, yadda. It does it for every single message and there will be several hundred when we generate the merge. Is there a way to get Outlook not to pop up this message? Otherwise it will require someone to sit there and watch the whole thing and keep hitting yes.

    Thanks in advance.

    Peter N

  2. #2
    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 Automation (2000 (SP3))

    The way to avoid it is to use the Redemption library instead of programming directly to the Outlook object model. You're running afoul of one of the many Outlook security patches and there really isn't any way to disable it safely (or at all). Redemption uses calls to Extended MAPI instead of MAPI (Outlook) and the same security holes don't exist in Extended MAPI. We use Redemption in our applications and it works just fine. The programming is slightly different, but the object model is similar enough to Outlook to avoid confusing you too much. Just be sure CDO is enabled on the machine, since it isn't installed automatically with Outlook.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access to Outlook Automation (2000 (SP3))

    Edited by HansV to activate link (see <!help=19>Help 19<!/help>)

    There is another tool that you can use which runs in the system tray, takes very little resources and is free. Ironically, it is called "Express Click Yes" .

    The link is: http://www.express-soft.com/mailmate/clickyes.html

    Shimmer

  4. #4
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access to Outlook Automation (2000 (SP3))

    Thanks to both Charlotte and Hans.

    Hans' solution was easier for the quick and dirty job I need to happen - it required no thought and almost no time. I will save Charlotte's for when I need a more robust and controllable solution in the future. It is helpful to know there are ways around what Woody's newsletters call "Microsoft's draconian security".

    Charlotte: could you explain what CDO is. That is a new one for me.

    Peter

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access to Outlook Automation (2000 (SP3))

    Note: the "quick" solution you liked was posted by Shimmer, not by me. I only edited it to make the URL clickable.

    CDO is Microsoft Collaboration Data Objects, a library that exposes more of the Outlook data model than the standard Outlook Object Library does. It comes in two flavors, one for "plain" Outlook, and one for Outlook with Exchange Server. If you want to know if you have it, search for CDO.DLL (standard) or CDOEX.DLL (for Exchange) on your hard disk, or select Tools | References in the Visual Basic Editor and see if Microsoft CDO ... is in the list.

Posting Permissions

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