I'm currently facing issues with putting HTML into VBA to send an e-mail. The formatting isn't coming out the way I want and I've been playing around with it.
The first part of my question is to get the font size to show up Outlook to what the code states. If the font size is 22, the size is being displayed in Outlook as 16.5 (the first line).
If the font size is supposed to be set to 11, the size is being displayed as 8.5.
I have the following questions for the table: The font is showing up as Times New Roman size 12 instead of Calibri size 11. Also, all of the "Column" and "Top Line" are not aligned to the top.
Is the syntax wrong?
.HTMLBody = "<html><center><p style='font-family:calibri;font-size:22'>" & "***<u>TEXT AT TOP</u> ***" & "</center></p>" & "<br>" & "<br>" & _
"<p style='font-family:calibri;font-size:11'>" & "Good afternoon," & "</p>" & "<br>" & _
"<p style='font-family:calibri;font-size:11'>" & "Attached please find your ... <strong> Please be advised.....</strong>" & "</p>" & _
"<table><tr><td style='font-family:Calibri:align = top:font-size:11'>Column 1:</td><td style='font-family:Calibri'>Top Line</td></tr>" & "<br>" & _
"<tr><td style='font-family:Calibri:align = top:font-size:11'>Column 2</td><td style='font-family:Calibri:align = top:font-size:11'>Top Line Row 2 <br> More text</tr></td>" & "<br>" & _
"<tr><td></td><td style='font-family:Calibri:align = top:font-size:11'>Top Line Row 3 <br> More text </tr></td>" & "<br>" & _
"<tr><td style='font-family:Calibri:align = top:font-size:11'>Column 3</td><td style='font-family:Calibri:align = top:font-size:11'>Top Line Row 4:</tr></td></table>" & "<br>" & _
"<p style='font-family:calibri:font-size:11'>" & "Should you have any questions, or require any additional information, please do not hesitate to contact me anytime. Thank you!" & "</p>" & "<br>" & _
"<p style='font-family:calibri:font-size:11'>" & "Best regards," & "</p>" & _
"<table><tr><td style='font-family:Calibri:font-size:12'><strong>Size 12 text</strong> | text <br> text </tr></td>" & _
"<tr><td style='font-family:Calibri:font-size:12><strong>Name</strong></tr></td><table>" .Display
Thank you!