Results 1 to 4 of 4
  1. #1
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60

    Automatically enter email address from customer table

    I have a query which opens an invoice report for the current record, I then click a button, select PDF & it is then added to an email.

    Is there any way I can get the email address to be entered automatically? The email address is stored in my customer table.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    My preference is to use VBA. Here is one approach using VBA.

    Code:
    Dim strSubject As String
    Dim strBody As String
    Dim strReport As String
    Dim strTo As String
    Dim strCc As String
    Dim strBcc As String
    strSubject = "Insert Subject Line Here"
    strBody = "Insert text to be displayed in the email body"
    strReport = "rptEquip"
    strTo = "you@gmail.com"
    strCc = ""
    strBcc = "me@gmail.com"
    DoCmd.SendObject acSendReport, strReport, acFormatTXT, strTo, strCc, strBcc, strSubject, strBody, False

  3. #3
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60
    Thanks. Can I do that through a macro as I do not really have an knowledge of VBA?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You can build macros to send an email. I believe there is a way via an Email tool within the Ribbon. You can explore this method by clicking the "E-mail" tool under the "External Data" tab in the Ribbon.

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

Similar Threads

  1. Replies: 1
    Last Post: 05-01-2014, 11:37 AM
  2. Replies: 6
    Last Post: 12-11-2013, 09:27 PM
  3. Replies: 1
    Last Post: 07-16-2013, 12:16 PM
  4. Replies: 13
    Last Post: 11-07-2012, 03:14 PM
  5. Replies: 1
    Last Post: 08-31-2012, 01:47 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