Multiline Email using VBA and Redemption

  • Thread starter Thread starter Danu
  • Start date Start date
D

Danu

From Access I need to send a multiline email. I have been able to do this
with no problems if the message is short but this is a complicated text body.

I have entered "& vbCrlf" after each line return. When I send myself a test
message, I see just the last line of the email.

How do I "string" the lines of the email togther?

(Newbie here.) Thanks in advance for your help.
 
Here are a few lines:

objSafeMsg.Body = "Good Morning," & vbCrLf 'separate lines by adding a
vbCrlf at the end of the line.
objSafeMsg.Body = "" & vbCrLf
objSafeMsg.Body = "This portion of the text is several lines in length
but one paragraph." & vbCrLf
objSafeMsg.Body = "" & vbCrLf
objSafeMsg.Body = "This is a continuation of the email message." & vbCrLf
objSafeMsg.Body = "" & vbCrLf
objSafeMsg.Body = "Thank you." & vbCrLf

When I send a test email, all I see is "Thank you."

Thanks for your help.
 
In each line you are overwriting the previous Body, not appending to it.

Try something like this:

objSafeMsg.Body = objSafeMsg.Body & "" & vbCrLf

That appends whatever is new to the existing Body.
 
Back
Top