• SendObject (Access03)

    Author
    Topic
    #426851

    How do I send multiple reports in one email? I don’t want to combine the two reports into one, but they will usually go out together. I am using the following code for the basics, but havent’ figured out how to combine to reports.

    Private Sub cmdEmailFuture_Click()
    On Error GoTo Err_cmdEmailFuture_Click

    Dim stDocName As String
    Dim stDocName1 As String
    stDocName = “rptFutureClasses”
    stDocName1 = “rptFutureRegistrations”
    DoCmd.SendObject acSendReport, stDocName, acFormatRTF, [Forms]![frmReports]![txtEndoManager] _
    , , , “Future classes and registrations”, “Thank you. Please let me know if there are” _
    & ” any problems. Fay”
    Exit_cmdEmailFuture_Click:
    Exit Sub

    Err_cmdEmailFuture_Click:
    MsgBox Err.Description
    Resume Exit_cmdEmailFuture_Click

    End Sub

    Thank Fay

    Viewing 0 reply threads
    Author
    Replies
    • #987497

      You can mail only one object (table, query, report) at a time with SendObject. There is no way to add multiple attachments. If you need that, you can use Automation to control Outlook from Access.

      See post 383,316 for an example and WendellB’s tutorial Automation 101 for general info on Automation.

      • #987502

        Bummer. Thanks Hans I will check the other two items out. Fay

    Viewing 0 reply threads
    Reply To: SendObject (Access03)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: