Reputation: 103
I have a Form in Access which has textbox in it. I want to input the textbox value to outlook mail body. The code I have is as follows.
With OutMail
.SentOnBehalfOfName = ""
.To = ""
.CC = ""
.Subject = "Test"
.HTMLBody = RangetoHTML(objExcel, rng) & Chr(13) & Chr(10) & Form_FactorCoupon.Text25
.Save
.Close olPromtForSave
End With
RangetoHTML(objExcel, rng)
- this function copies an excel range and paste it into mail body.
Form_FactorCoupon.Text25
- this is the textbox in the form which contains email signature.
My issue is that Chr(13) & Chr(10)
is not working. I used this to leave a line and then provide email signature.
How to leave a blank line and provide textbox values?
Upvotes: 0
Views: 306
Reputation: 133
You should use: "<br>"
instead of Chr(13) & Chr(10)
.
<br>
is an HTML tag for the new line (break line), while Chr(10)
(linefeed character) and Chr(13)
(carriege return) are characters used to get a new line in text files (not in HTML).
Upvotes: 3