Ashfaque
Search Beautiful Girls from your town for night
- Local time
- Tomorrow, 02:07
- Joined
- Sep 6, 2004
- Messages
- 894
I want my query result to appear in my email in a form of formatted html table using this code.
The email is being generated but query data is with attachment and not in the massage area.
Can anyone please help me out to place the query result at massage please? I need the result in mssg body of email in html. I have attached sample result.
Thanks,
The email is being generated but query data is with attachment and not in the massage area.
Code:
Dim strEmailSubject, strEmailText, olNewEmail As String
Dim strMailList, StrCC As String
StrCC = "int@gmail.com"
strMailList = " Test@gmail.com"
DoCmd.OpenQuery "Q_IntroNewEmp", acViewNormal, acEdit
DoCmd.SelectObject acQuery, "Q_IntroNewEmp"
DoCmd.RunCommand acCmdSelectAllRecords
RunCommand acCmdCopy
DoCmd.SendObject acSendQuery, "Q_IntroNewEmp", , "'strMailList", "XYZ@inatt.com", "INTRODUCTION TO NEW EMPLOYEE/(S)" & _
"We are pleased to introduce following new employees recently hired to our growing INAT family:" & _
"Good Luck and Best Regards," & _
vbCr & vbCr & "Sincerely," & vbCr & vbCr & "AA" & vbCr & "Human Resources Dept.", True
DoCmd.Close acQuery, "Q_IntroNewEmp", acSaveNo
SendKeys "^v", True
SendKeys "{ENTER}", True
Can anyone please help me out to place the query result at massage please? I need the result in mssg body of email in html. I have attached sample result.
Thanks,