Adding space in the body of an automated email

Ln1 is the body of an email that we are sending when a failure occurs, however it puts it all in a string.  How would I add a new row to break apart the continuous string?  Please advise and thanks.

	strHTML = ("Failure Ycode: "&a&" attempted an SAP login that failed.  The following error resulted: "&b&"  Please re-execute after test userId is available for use.")
	strSubject = ("SAP Test UserId Login Failure; QEC: ")
	Set Outlook = CreateObject("Outlook.Application") 'Send failure email here.
	Dim Message 'As Outlook.MailItem
	Set Message = Outlook.CreateItem(0)
	With Message
		.Subject = strSubject
		.HTMLBody = strHTML
		.To = ("randy.hozeski@haworth.com")
		'.To = ("randy.hozeski@haworth.com;scott.larue@haworth.com")
		.Send
	End With

Open in new window

RWayneHAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nick67Commented:
It's .HTMLBody, so the contents of the string need to be properly formed HTML
Choose <p></p> or <br /> whichever suits you best

strHTML = ("Failure Ycode: "&a&" attempted an SAP login that failed.<br />   The following error resulted: "&b&"<br />   Please re-execute after test userId is available for use.")
0
RWayneHAuthor Commented:
Thanks worked great!!  would the same thing go for bolding the items after each :    ??
0
Nick67Commented:
Yup.
It's html.
Any properly formatted html string is fair game.
Being Outlook, HTML4 is what is in play, so don't go too crazy and I don't think CSS is an option, though I have never tried it.

strHTML = ("Failure Ycode: <b>"&a&"</b> attempted an SAP login that failed.<br />   The following error resulted: <b>"&b&"</b><br />   Please re-execute after test userId is available for use.")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RWayneHAuthor Commented:
Sweet!!  Thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.