Send email automatically using SendObject

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phill86
    New Member
    • Mar 2008
    • 121

    Send email automatically using SendObject

    Hi

    I am using the following code to send an email from access via outlook automatically

    Code:
     
    DoCmd.SendObject acSendReport, stDocName, acFormatRTF, "User", , , , , False
    Which works fine but i get an outlook error message which says

    "A program is trying to send an email message on your behalf. if this is unexpected .... Blah Blah Blah

    Allow Deny Help

    is there anyway that i can avoid this message and send the email without verification?

    Regards Phill
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    If using Outlook 2007, you may be able to change the Programmatic Access setting under Tools -> Trust Center.
    I'm not sure where this is located in previous versions.

    Comment

    • Stewart Ross
      Recognized Expert Moderator Specialist
      • Feb 2008
      • 2545

      #3
      Hi. The Outlook message is intended to warn you that it is being used to send a message under programme control - guarding against spamming uses for example. I don't think you can stop Outlook from asking for this kind of confirmation; however software solutions such as ClickYes can automate the sending of the confirmation keypress for you and allow fully unattended e-mails to be sent from Access via Outlook.

      There are paid-for and free versions of ClickYes available (I have the free version, Express QuickYes, installed myself and although there are some limitations it does the job well enough). If you are interested the vendor's website is http://www.contextmagic.com/express-clickyes/. No doubt there are similar solutions available from other vendors, which some searching on Google may reveal.

      -Stewart

      Comment

      • phill86
        New Member
        • Mar 2008
        • 121

        #4
        Hi Stewart apologies for the late reply i have been away

        Thanks for your help

        Phill

        Comment

        Working...