Results 1 to 5 of 5

Thread: Auto Email

  1. #1
    Join Date
    Mar 2005
    Posts
    55

    Question Unanswered: Auto Email

    I have an email address in my table. How do I email a report associated with that record to the corresponding email address in the table.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    docmd.SendObject acSendReport, "ReportNameHere",,"Email@Address.com"
    George
    Home | Blog

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Paul

  4. #4
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388

    Auot email

    Use code similar to this. This will get theemail address and open outlook so that you can add a message etc. If you change True to false it will automatically send the email.

    Dim email_subject As String
    Dim email_address As String
    dim report_name as string

    email_address= Use DLookup to obtain the mail address
    report_name = "Enter name of report"
    email_subject = "Enter email subject"

    DoCmd.SendObject acReport, report_name, "SnapshotFormat(*.snp)", email_address, "", "", email_subject, "", True, ""

    Note report_name and email_subject each must be enclosed by double quotes.

  5. #5
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Do a Google search on vbSendMail. It is by far the easiest and most complete email solution out there.

    C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •