Results 1 to 10 of 10
  1. #1
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46

    Auto Email

    Is it possible to have an email function built inside of my save button?



    Once my user saves the form, I am auto emailed from access that a form has been filled out?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Yes CDO or emailing a report as an attachment using DoCmd.SendObject are probably the least intrusive approaches.

  3. #3
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    Thanks, got it working, is there a way to bypass outlook opening and prompting the user to send? Can we silent send?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    It sounds as though you are using SendObject

    The false at the end will hide UI and send report
    DoCmd.SendObject acSendReport, strReport, acFormatTXT, strTo, strCc, strBcc, strSubject, strBody, False

  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
    53,771
    Are you using SendObject? I don't think so.

    Outlook has a setting to allow programmatic access but posters have said this fails. And each user would have to set this in their Outlook.

    I use VBA that opens an Outlook object and manipulates it by addressing properties of the object. Does not use SendObject. I don't get the Outlook warning.
    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
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    June7, would you be kind enough to share your VBA with me? I would be eternally grateful!

  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
    53,771
    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
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    ... I don't get the Outlook warning.
    Interresting. I have been getting mixed results. I did some testing and got warning for both, sendobject and manipulating an Outlook object.

    June,

    do you use .Send and or .Save ?

  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
    53,771
    .DeleteAfterSubmit = True
    .Send

    I seem to remember getting the warning when I first built code but that was a couple of computers ago and haven't done anything special with current Outlook install. I don't even have the Allow Programmatic Access set.

    Sorry, can't solve the mystery.

    Maybe CDO gets around the warning?
    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
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I am taking a note of .DeleteAfterSubmit = True

    CDO will definately avoid the warning. It does not consider Outlook, let alone depend on it. So if OP still needs another option....

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

Similar Threads

  1. Auto-Generated Email
    By jle0003 in forum Access
    Replies: 3
    Last Post: 08-20-2012, 01:33 PM
  2. Auto Email in Access 2007
    By CoreyBuchan in forum Access
    Replies: 1
    Last Post: 06-29-2012, 07:36 AM
  3. Auto Run Report then Auto Email
    By jo15765 in forum Reports
    Replies: 1
    Last Post: 10-05-2011, 10:57 AM
  4. Auto email not working
    By edzigns in forum Programming
    Replies: 1
    Last Post: 04-29-2011, 12:41 PM
  5. Auto email query
    By warrigal in forum Database Design
    Replies: 3
    Last Post: 03-23-2011, 07:09 PM

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