I would like to add the day of the week and date to the subject/body of an email being sent when a command button is clicked on a form in Access 2010. How is this accomplished?
Attached is a screenshot of the macro.
I converted the macro to VBA, but until I become better familiar with VBA in Access, I would like to stick with macros. I did add the =NOW function to the code and it works, but it also includes the time which I do not want. Also I'm not sure how to add the day of the week.
Any help with this is appreciated.
Attached is a screenshot of the macro.
I converted the macro to VBA, but until I become better familiar with VBA in Access, I would like to stick with macros. I did add the =NOW function to the code and it works, but it also includes the time which I do not want. Also I'm not sure how to add the day of the week.
Any help with this is appreciated.
Code:
Option Compare Database
Function mcr_EmailReport2CS()
On Error GoTo mcr_EmailReport2CS_Err
DoCmd.SendObject acReport, "rpt_LTL Shipments for CS", _
"PDFFormat(*.pdf)", "email@domain.com", "", "", _
"LTL Shipping Report ( )", "Attached is the shipping report for ______", True, ""
mcr_EmailReport2CS_Exit:
Exit Function
mcr_EmailReport2CS_Err:
MsgBox Error$
Resume mcr_EmailReport2CS_Exit
End Function