vbCrLf

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I'm using Office 2003 and setting up an email. In the body I need to use
vbCrLf, bjut it's not working. Here's the first line of the code for the
Body of the email:

..HTMLBody = "Attached is a listing of the containers which should arrive
shortly." & vbCrLf & vbCrLf _

Thanks for your help.
 
SAC said:
I'm using Office 2003 and setting up an email. In the body I need to
use vbCrLf, bjut it's not working. Here's the first line of the code
for the Body of the email:

.HTMLBody = "Attached is a listing of the containers which should
arrive shortly." & vbCrLf & vbCrLf _

Thanks for your help.

And what is not working? Can I assume that there is more text after the _? if
so did you add another &? Here is an example of how I would use vbCrLf...

"First paragraph" & vbCrLf & vbCrLf & _
"Second paragraph"
 
SAC said:
I'm using Office 2003 and setting up an email. In the body I need to use
vbCrLf, bjut it's not working. Here's the first line of the code for the
Body of the email:

.HTMLBody = "Attached is a listing of the containers which should arrive
shortly." & vbCrLf & vbCrLf _

Thanks for your help.

HTML doesn't understand CrLf. Use <br> (line break) instead:

..HTMLBody = "Attached is a listing of the containers which should arrive
shortly.<br><br>"

or you may find you get a nicer effect by making it a paragraph:

..HTMLBody = "<p>Attached is a listing of the containers which should arrive
shortly.</p>"
 
Stuart said:
If at first you don't succeed, failure may be your style

<ducking>

I love that poster. A few others I like...

"That which does not kill me postpones the inevitable"

"A journey of a thousand miles sometimes ends very, very badly"

"Consistency... It's only a virtue if you're not a screwup"
 
Rick Brandt said:
"Consistency... It's only a virtue if you're not a screwup"

Lol! Hadn't heard that one before. Duly filched & added to my collection.

"If you think there's a solution, you're part of the problem."

"Knowledge adds and multiplies as we divide it with others."

(I could carry on for hours - but perhaps better to end it here - its a bit
OT)

Cheers
 
Thanks! Works great.

Stuart McCall said:
HTML doesn't understand CrLf. Use <br> (line break) instead:

.HTMLBody = "Attached is a listing of the containers which should arrive
shortly.<br><br>"

or you may find you get a nicer effect by making it a paragraph:

.HTMLBody = "<p>Attached is a listing of the containers which should
arrive shortly.</p>"
 
Back
Top