Currently, I have a code working that will attach my current record that is populated with data into an email in a PDF format. However, I can't get the attachments on the current recordset to go along in the email. Any suggestions? Below is my CODE:
Code:
Private Sub BTN_SUBMIT_Click()
Dim strSPCcode As String
Dim strReport As String
Dim strEmail As String
Dim strCC As String
Dim strMSG As String
strMSG = "DC_7"
strCC = Me.ptEMAIL & "," & Me.dcxEMAIL & "," & "Email@email.com"
strEmail = Me.TO
strSPCcode = Me.conNum
'Name of Report goes here
strReport = "RPT_7"
Me.Refresh
DoCmd.OpenReport strReport, acViewPreview, , "ID= " & Me!ID
Reports(strReport).Visible = False
'''ADD New Record'''''''''''''''''''''''''''''''''''''''''''''''
DoCmd.GoToRecord , , acNewRec
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''Structure of the Email ''''''''''''''''''''''''''''''''''''''
DoCmd.SendObject acSendReport, _
strReport, _
acFormatPDF, _
strEmail, _
strCC, , _
strMSG & "=" & " " & strSPCcode
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
DoCmd.SendObject
DoCmd.Close acReport, strReport
End Sub