Font Sizing in HTML

DougRobertson

Active Member
Joined
Sep 22, 2009
Messages
334
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am using HTML code within VBA to create the text within the Macro-generated emails.

Using Font Size 2 in HTML will give me a font size of 10 in my email.
Using Font Size 3 in HTML will give me a font size of 12 in my email.

Is there any way of over-riding this method, as I need to get an actual font size of 11 for the text in my email.

Many thanks in advance for any assistance on this!

~ DWR
 
... okay, let's try that again.

Code:
[LEFT][COLOR=#222222][FONT=Verdana]< span style='font-size:" & iOutlookFONTSize11 & "pt' >[/FONT][/COLOR][/LEFT]
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi Doug,

never knew that existed. So thanks for that.
Just go to the Sent Mail folder and right-click - view code.
See how it converts that to font-size HTML in the mail.
It should all look compliant.
 
Last edited:
Upvote 0
Hi Dave,

It works just as advertised. Font size 11 comes out as size 11, size 20 comes out as size 20, and so on.

I've been stumped on this code for probably closer to 10 years now, with a few visits to Mr. Excel, but to no avail ... until now.

The more I learn about Excel, the more I realize that I DON'T know!

Again, many thanks! Now I'm off to re-code all my Macros ...
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top