We're creating an Outlook mailitem and setting up a part of the message body. However the client wants the message body to end with a clean fresh line so he can add further text.
It's a trivial request but ...
It seems adding anything which isn't a character or else
to the end of .HTMLBody
is ignored/trimmed off.
We want our mail message to end with a new line but we're finding:
tried 1
x.HTMLBody = CustomerName & "," & "<p>"
and
x.HTMLBody = CustomerName & "," & "<br>"
and
x.HTMLBody = CustomerName & "," & "<br><br>"
all result in:
Mr MAWHOOD,
^ = cursor positioned here
this isn't what the client wants ... he wants the cursor to start on a fresh line
tried 2
x.HTMLBody = CustomerName & "," & "<br> "
results in:
Mr MAWHOOD,
^ = cursor positioned here (one space in)
this is slightly better ... but still client wants to know why we have this "hacky" space on our new line
tried 3
x.HTMLBody = CustomerName & "," & "<p> </p><br />"
results in:
Mr MAWHOOD,
^ = cursor positioned here (correct, but now two lines down)
strange that the only way to get a new trimmed line is we accept we have to have two of them?
You should try your second approach, but add the
HTML character at the end. This is the backspace character, and may take off that "hacky" space after the line break. So
I found it here: http://www.w3schools.com/TAGS/ref_ascii.asp However I can't be certain it will work, and it probably won't....