Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004

    Unanswered: Email 2 reports in 1 email

    this is my code for sending 1 report

    Dim MyDB As Database
    Dim MyRS As dao.Recordset
    Dim TheAddress As String
    Dim stDocName As String
    Set MyDB = CurrentDb
    Set MyRS = MyDB.OpenRecordset("qryEmailFlyer")
    Do Until MyRS.EOF
    TheAddress = MyRS![EmailAddress]

    stDocName = "Movie Program"
    DoCmd.SendObject acReport, stDocName, acFormatSNP, TheAddress, , , "movie program Starting " & Text2, "If you cannot view please download the viewer at", False

    i want to send 2 reports in the 1 email

  2. #2
    Join Date
    Aug 2004
    would it be better to send 2 emails

  3. #3
    Join Date
    Dec 2004
    nah it def would be better with one e-mail

    but i haven't found an answer yet to putting 2 attachments in once email

  4. #4
    Join Date
    Aug 2004
    ok there is no easy way of doing this but can i send the reports to a folder let it be t:\emails then find all files in that folder as one email and just before we start the process delete all files in that folder. i will be sending them as snp files

  5. #5
    Join Date
    Aug 2004
    some one sent me this code to send more than one report can someone tell me how to intrate it with my code

    Dim OL As Outlook.Application, OI As Outlook.MailItem, OA As Outlook.Attachments
    Set OL = Outlook.Application
    Set OI = OL.CreateItem(olMailItem)
    OI.Recipients.Add ""
    OI.CC = ""
    OI.BCC = ""
    OI.Subject = "Sample"
    OI.Body = "Hi there"
    Set OA = OI.Attachments
    OA.Add "L:\FMS\REPORTS\Lease.xls", olByValue, 1, "Leasing Report"
    OA.Add "L:\FMS\REPORTS\Action.xls", olByValue, 1, "Action Report"
    OA.Add "L:\FMS\REPORTS\Finance.xls", olByValue, 1, "Finance Report"
    End Sub

Posting Permissions

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