+ Reply to Thread
Results 1 to 9 of 9

Setting 11 pt font size in outlook email using excel vba

  1. #1
    Registered User
    Join Date
    09-23-2011
    Location
    Calcutta
    MS-Off Ver
    Excel 2007
    Posts
    26

    Setting 11 pt font size in outlook email using excel vba

    Hi,

    I need help in setting a font size of 11 in an outlook email using a vb code.

    I am currently using

    Please Login or Register  to view this content.
    The above code generates a font size of 12 in outlook. Minute decrements in the size from 3 generates a font size of 10 in outlook - the size 11 does not arrive at all.

    Is there any way to obtain this font size?

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Setting 11 pt font size in outlook email using excel vba

    This is what I use. Give it a try.


    .HTMLBody = "<p style='font-family:calibri;font-size:14.5'>Font Size Test</font></p>"

  3. #3
    Registered User
    Join Date
    09-23-2011
    Location
    Calcutta
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Setting 11 pt font size in outlook email using excel vba

    Hi Jie,

    Thanks for the help! The font size is set now, but I am unable to set the font color to blue, even if I add
    font-color:blue
    to the above stretch of code. The default black color is used.

    How do I get the blue color?

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Setting 11 pt font size in outlook email using excel vba

    .HTMLBody = "<p style='color:#00f;font-family:calibri;font-size:14.5'>Font Size Test</font></p>"
    OR
    .HTMLBody = "<p style='color:rgb(33,38,227);font-family:calibri;font-size:14.5'>Font Size Test</font></p>"

  5. #5
    Registered User
    Join Date
    09-23-2011
    Location
    Calcutta
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Setting 11 pt font size in outlook email using excel vba

    Works like a dream!

    Thanks a ton.

  6. #6
    Registered User
    Join Date
    09-25-2017
    Location
    Chicago, IL
    MS-Off Ver
    10
    Posts
    2

    Re: Setting 11 pt font size in outlook email using excel vba

    How do I add this to a macro?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Setting 11 pt font size in outlook email using excel vba

    canetta welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    05-09-2019
    Location
    Vietnam
    MS-Off Ver
    MS 13
    Posts
    1

    Re: Setting 11 pt font size in outlook email using excel vba

    Hi,

    Thanks for your help. Btw when I try to add automatic email signature by using & .HTMLBody, the size turns back to be default setting (10pt)

    .HTMLBody = "<p style='color:rgb(33,38,227);font-family:calibri;font-size:14.5'>Font Size Test</font></p>" & .HTMLBody

    I would appreciate if you could help me fix this issue. Thanks

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Setting 11 pt font size in outlook email using excel vba

    Press the smiley

    The code is in the vba module, got issues with the code in thepost
    Attached Files Attached Files
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1