locked
Requesting ideas for an e-mail feature in my Access application RRS feed

  • Question

  • I have an application running at one of the Boston Public Schools.  They would like to be able to send reports to parents, based on parents' e-mail addresses stored in a table.  The problem is, Outlook is not installed in that environment.  Can anyone think of a way for me to allow teachers, relatively easily, to e-mail specific reports to specific e-mail addresses without the aid of Outlook?

    TIA

    LAS

    Saturday, December 29, 2012 8:22 PM

Answers

All replies

  • Tony Toews lists several options (including Directly via the Winsock and CDO aka CDONTS) in his Microsoft Access Email FAQ.

    Doug Steele, Microsoft Access MVP
    http://www.AccessMVP.com/djsteele (no e-mails, please!)
    Co-author Access Solutions — Tips, Tricks, and Secrets from Microsoft Access MVPs (ISBN 978-0-470-59168-0)

    • Marked as answer by LAS14 Tuesday, January 1, 2013 5:03 PM
    Saturday, December 29, 2012 8:32 PM
  • Access 2007 and later one can right click on a displaying report and 'Export' typically a pdf - so it is a document outside of Access , saved in a folder - - then of course can be an attachment via any email method.....

    one can right click and 'Send To'...and I can't remember if that is requiring Outlook or whether it will launch whatever is the default email program set up in the OS.... I actually was thinking it would launch any default email app but that may be wrong...of course if they use browser to connect to email then there may exist no default email app at all....

    Saturday, December 29, 2012 8:50 PM
  • I should have specified that these are Access reports generated from my application.
    Saturday, December 29, 2012 9:02 PM
  • So what happens when you try using DoCmd.SendObject? It doesn't depend on Outlook being installed: it should use the default e-mail client.


    Doug Steele, Microsoft Access MVP
    http://www.AccessMVP.com/djsteele (no e-mails, please!)
    Co-author Access Solutions — Tips, Tricks, and Secrets from Microsoft Access MVPs (ISBN 978-0-470-59168-0)

    Saturday, December 29, 2012 9:36 PM
  • Thanks, Doug,

        I didn't know about DoCmd.SendObject.  I was working off a longish script that starts out like the one below.  I'll study up on SendObject.  May I ask you one other questions.

    I had originally thought about creating a command file, hoping that a browser command could be launched that way.  Can it?  Is there anyway to put browser related activities into a command file or something like that?  At this point I'm not sure if a browser is involved in the school's e-mail.  I think it's their own e-mail server.  I don't know how that works.  Will have to wait until after New Year's.

    LAS

    Dim objOutlook As outlook.application
       Dim objOutlookMsg As outlook.MailItem
       Dim objOutlookRecip As outlook.Recipient
       Dim objOutlookAttach As outlook.Attachment
       Dim findslash As Integer
       Dim account As outlook.account

       On Error GoTo ErrorMsgs

       ' Create the Outlook session.
       Set objOutlook = CreateObject("Outlook.Application")
       ' Create the message.
       Set objOutlookMsg = objOutlook.CreateItem(olMailItem).... etc., etc., etc.

    Saturday, December 29, 2012 10:38 PM
  • I had originally thought about creating a command file, hoping that a browser command could be launched that way.  Can it?  Is there anyway to put browser related activities into a command file or something like that?  At this point I'm not sure if a browser is involved in the school's e-mail.  I think it's their own e-mail server.

    Are you saying that they use a web interface (like Gmail) for e-mail? I don't believe it's possible to script using a command file, although it might be possible to use Automation on the web browser control. And I don't believe SendObjects will work with a web-based e-mail client either.


    Doug Steele, Microsoft Access MVP
    http://www.AccessMVP.com/djsteele (no e-mails, please!)
    Co-author Access Solutions — Tips, Tricks, and Secrets from Microsoft Access MVPs (ISBN 978-0-470-59168-0)

    • Marked as answer by LAS14 Tuesday, January 1, 2013 5:04 PM
    Saturday, December 29, 2012 11:49 PM
  • Install Outlook and then take a look at these two samples that I posted to my server:

    http://www.mediafire.com/?j7och9ohnim8zcz

    http://www.mediafire.com/?4n1c38fiey8mvhj

    Hope this helps.



    Ryan Shuell

    Sunday, December 30, 2012 6:10 AM
  • The way to send emails reliably is to use an SMTP server. This avoids dependencies on Outlook, conflicts with MAPI security rights, problems with Outlook versions, whether it's open or not, etc.

    Our Total Access Emailer addin program uses SMTP and lets you send personalized emails to your entire list with attachments of Access reports as PDF files filtered for each recipient. The addin requires no programming and lets you use any table or query as your data source for your emails. Emails can be plain text or HTML format. With the latter, you can even use an HTML template file on disk and embed graphics in the email (or point to graphic files on a public web site). There's also built-in auditing to document when messages are sent and the ability to restart if an email blast is disrupted before completion.

    The Professional Version includes a VBA programmatic interface and runtime library so you can invoke email blasts in your code to tie it to a button or other event. It includes a royalty-free distribution license so you can create email applications and deploy them to others.

    A free trial of the Microsoft Access email addin is available.

    Hope this helps.


    Luke Chung
    Microsoft MVP
    President of FMS, Inc.
    Facebook Twitter

    Thursday, January 3, 2013 10:56 PM
  • There are lots of limitations to the DoCmd.SendObject command.

    Wrote a paper about it: DoCmd SendObject Command in Microsoft Access: Features and Limitations for
    Sending Emails


    Luke Chung
    Microsoft MVP
    President of FMS, Inc.
    Facebook Twitter

    Thursday, January 3, 2013 10:58 PM