zupp
zupp

Reputation: 138

How can I implement display inline (html/css) in VBA?

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

this is the result

Upvotes: 0

Views: 345

Answers (1)

StureS
StureS

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

Related Questions