I have been successful in exporting the active record in PDF format to Outlook for e-mail using VBA. I have added text to the email. However when the message text exports to Outlook the 1st line is blank and the text starts on the 2nd line. For example...
Message Text:
"Unwanted Empty Line"
"Dear...."
""
"Please..."
How can I have the "Dear..." start on the 1st line of the e-mail (instead of the 2nd line) without manually formatting the e-mail?
Code is below.
Code:
Sub Send_Click()Dim strDocName As String
Dim strWhere As String
strDocName = "frmInvoice"
strWhere = "[B]=" & Me.B
DoCmd.ApplyFilter cPreview, strWhere
Dim mailto As String
Dim emailmsg As String
mailto = [Invoice Contact - E-mail]
emailmsg = "Dear " & [Invoice Contact - First Name] & " " & [Invoice Contact - Last Name] & "," & vbCrLf & vbLf & _
"Please..."
DoCmd.SendObject acSendForm, "frmInvoice", acFormatPDF, mailto, , , mailsub, emailmsg, True
End Sub