Results 1 to 8 of 8
  1. #1
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352

    Question Alternative Way to Send Report by Email?

    Hi all,



    I have been emailing .pdf reports from my database to place orders for various parts the company needs. I have simply been using the SendObject() method and it has sufficed, but I am wondering if there is a better way to send emails from Access?
    SendObject has a lot of limitations that I do not like. Specifically, not being able to specify a From address and that irritating MAPI confirmation of "do you really want to allow this program to send an email on your behalf" message that, plainly, confuses new users.

    Would using CreateObject(Outlook.Application) be a better route? Any other ideas and advice appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That would give you more control, but still throw the warning if you send directly. CDO would probably cover both bases, since it bypasses Outlook.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Thanks Paul, I had a feeling there was other methods but couldn't find anything other than sendObject.

    In order to use the cdo I will need to code in all the information out the smtp server, correct? Everyone at the plant will still be using Outlook as their main source for sending/receiving mail, but this method will surpass the outlook confirmation?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, you put in the server info (in my case it's an Exchange Server) and emails go directly to it rather than through Outlook. The downside is that items sent don't appear in Sent Items, so I often cc somebody. The upside is you can use whoever you want for the From.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Great! I am working on getting the module working, but I am having problems trying to find my server's port #... We use a company exchange server it appears, and nowhere in my account settings can I locate a port number. Am I looking in the wrong spot, or might I have to find the admin who sets up the mailboxes?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The argument for "smtpserverport"? I use 25 and it works with our Exchange server.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Set serverport to 25 and there was no issue.
    Thanks for the help guys, works out well!

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Send Multiple report in one email
    By Kmahraz in forum Programming
    Replies: 9
    Last Post: 08-20-2015, 12:56 PM
  2. Send Report as body of email
    By chris.williams in forum Reports
    Replies: 3
    Last Post: 09-15-2012, 09:43 AM
  3. Send Report and Attachments in Email
    By Pimped in forum Programming
    Replies: 1
    Last Post: 06-21-2011, 02:51 AM
  4. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  5. How to send filtered report via email
    By degras in forum Reports
    Replies: 4
    Last Post: 03-31-2011, 09:09 AM

Tags for this Thread

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