0

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

1 Answer 1

1

<p> is a paragraph, it adds a newline. Replace <p> with <span> which does not add a newline (and consequently replace </p> with </span>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.