hi
i want to know how i can expand below code to send report also pasted into the body of email.
This Code is working good but this is only send as PDF attachment.
Please help
Option Compare Database
Private Sub Command0_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim eml As String
Dim vOfficeID As String
Set db = CurrentDb
Set rs = db.OpenRecordset("SDE_Email_List", dbOpenDynaset)
rs.MoveFirst
Do
vOfficeID = rs("OfficeID")
DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT [MDO_Sales_Table].* INTO [SDE_Output_table] FROM [MDO_Sales_Table] WHERE ((([MDO_Sales_Table].OfficeID)= '" & vOfficeID & "'))", -1
DoCmd.SendObject acSendReport, "Report Name", acFormatPDF, rs("Email Address"), rs("CC"), "", "Subject", "Please find attached file", 0, False
rs.MoveNext
Loop Until rs.EOF
rs.Close
db.Close
End Sub