Reputation: 138
I am using VBA to generate an Outlook email. I want to put the email address with a gray background color and I want it to be in front of "Resource (s):".
This is my VBA code:
bodyHTML = bodyHTML + "<p style=""display: inline"">Resource(s): @" & "<p style=""display: inline; background-color: #EDEDE7; font-size: 15px; font-weight: normal"">" & aloc.resourceEmail & "</p></p>"
This is the result. Over the dotted line: the way it is. Below the dotted: The way it should be
Upvotes: 0
Views: 345
Reputation: 237
<p> is a paragraph, it adds a newline. Replace <p> with <span> which does not add a newline (and consequently replace </p> with </span>
Upvotes: 1