none
SendEmail macro causes Outlook Security dialog

    Question

  • I'm using Access 2010 and Outlook 2010 and wrote a VBA method in Access that sends an email. The basic code looks like this:

    Set mailSender = New Outlook.Application
    Set mail = mailSender.CreateItem(olMailItem)
    ...
    mail.Save
    mail.Send
    

    I have anti-virus running and when I call this method the email is sent without a security prompt.  This works great!

    Now, if I use the SendEmail action in a data macro, it sends an email just fine, but I get the anoying security dialog that I have to deal with.  I assume the macro approach is going through different system layers and is viewed differently by Outlook.

    Is there a way to configure this so the macro does not require the security dialog?

    Saturday, April 30, 2011 9:30 PM

All replies

  • I don't know, I doubt it, but what you could do is use the Redemption library when sending an email. It does not generate that annoying security dialog. http://www.dimastr.com/redemption/
    -Tom. Microsoft Access MVP
    Saturday, April 30, 2011 10:04 PM
  • I can't call the Redemption library from a macro.  The VBA code works great; the changes made in 2010 should mostly eliminate the need for the Redemption library since the dialog is supressed as long as the anti-virus is active and up-to-date.  The problem I'm having with the SendEmail action.  How ever this was coded, internally, does not seem to be compatible with the security enhancements.
    Saturday, April 30, 2011 10:26 PM
  • I've used this with great success:

    http://www.contextmagic.com/express-clickyes/

     

    Saturday, April 30, 2011 11:21 PM
  • I agree with ryguy72, I have also used ClickYes with great success.


    Jeanette Cunningham
    Sunday, May 01, 2011 1:28 AM
  • Check this site out to, solution provided by Scott McDaniel;

    http://www.everythingaccess.com/vbMAPI.htm

     

    HTH,

    Daniel

    Sunday, May 01, 2011 1:36 AM
  • Hi Mark,

    Have you resolved your problem yet, and do the suggestions help you? If you still have any concern on the thread, feel free to follow up.

    Best Regards,




    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 06, 2011 9:42 AM
  • Hi Bruce,

    Thanks for following up.  Outlook 2010 was enhanced to allow programmatic access without the annoying security dialog as long as anti-virus software is installed and up-to-date.  And this works great when sending email from Access using VBA.  Kudos to Microsoft as this was a much needed improvement.  However, when called through a data macro I still get the dialog box.

    My question is for someone at Microsoft to confirm that this is expected and we have to use one of the suggested third-party solutions to "cover-up" the problem. Or, is there a way to configure the solution to take advantage of the 2010 improvements and avoid the dialog altogether.

    Regards,

    Mark Collins

    Friday, May 06, 2011 12:19 PM
  • I have never seen or heard of this: "Outlook 2010 was enhanced to allow programmatic access without the annoying security dialog as long as anti-virus software is installed and up-to-date.  And this works great when sending email from Access using VBA."

    It clearly is not the case for me or my clients.

     


    Jeanette Cunningham
    Friday, May 06, 2011 9:11 PM
  • Check out this article for details.  http://msdn.microsoft.com/en-us/library/ff864479.aspx
    Friday, May 13, 2011 1:22 AM
  • Thanks for the link, I wasn’t aware of this. I use the CreateObject method to send email – it suits me to have code that I know will work in earlier versions of access.

    I will have a look at your problem in more detail.

     


    Jeanette Cunningham
    Friday, May 13, 2011 5:47 AM
  • I asked my mvp colleagues about this issue for data macros. They did not have any suggestions.

    I have not yet built a web database - too busy with non-web databases for my clients.


    Jeanette Cunningham
    Monday, May 16, 2011 9:51 PM