Reputation: 185
I am using a VBA userform from which a user can send an email.
How do I create a vertical orange line as shown below?
In HTML, it would be something like this:
style="border-left: solid 4px #FF6801;">
Edit: answer based on Tim's answer:
Dim ol As Outlook.Application, m As Outlook.MailItem
Set ol = New Outlook.Application
Set m = ol.CreateItem(olMailItem)
m.Display
m.BodyFormat = olFormatHTML
m.HTMLBody = "<p style='border-left: solid 4px #FF6801;padding: 24px;margin-left:24px;'>" & VariableName.Value & "</p>"
Upvotes: 0
Views: 637
Reputation: 166970
This works for me:
Dim ol As Outlook.Application, m As Outlook.MailItem
Set ol = New Outlook.Application
Set m = ol.CreateItem(olMailItem)
m.Display
m.BodyFormat = olFormatHTML
m.HTMLBody = "<p>No border</p>" & _
"<p style='border-left: solid 4px #FF6801;'>With border</p>" & _
"<p>No border</p>"
Upvotes: 1