hi all
i have a piece of VBA that converts a form into a PDF and emails it to a recipient, what i cant find or do , is change the layout in side the .Body of the email
How do i go to the next line for the email, so for example
Hi All,
please find attached info
Regards
i have a piece of VBA that converts a form into a PDF and emails it to a recipient, what i cant find or do , is change the layout in side the .Body of the email
Private Sub CmdPDF_Click()
Dim oApp As New Outlook.Application
Dim oEmail As Outlook.MailItem
Dim fileName As String, todayDate As String
'Export report in same folder as db with date stamp
todayDate = Format(Date, "MMDDYYYY")
fileName = "C:\Users\stuar\OneDrive\Access\PDF\" & todayDate & ".pdf"
DoCmd.OutputTo acOutputForm, "FrmEventSRFRep", acFormatPDF, fileName, False
'Email the results of the report generated
Set oEmail = oApp.CreateItem(olMailItem)
With oEmail
.Recipients.Add "stuart.roberts@outlook.com"
.Subject = "SRF Form"
.Body = "Hi All, Please Find Attached the SRF Form"
.Attachments.Add fileName
.Send
End With
MsgBox "Email successfully sent!", vbInformation, "EMAIL STATUS"
DoCmd.Close acForm, "FrmEventSRFRep"
End Sub
How do i go to the next line for the email, so for example
Hi All,
please find attached info
Regards