+ Reply to Thread
Results 1 to 4 of 4

VBA changes the default font size in Outlook - How to fix?

  1. #1
    Registered User
    Join Date
    10-07-2022
    Location
    Cyyprus
    MS-Off Ver
    365
    Posts
    9

    VBA changes the default font size in Outlook - How to fix?

    Hello Everyone,

    I have a VBA code which creates an outlook email containing specific information. The issue is that despite having a default set font in Outlook (Calibri size 11) the font generated through the VBA is Calibri size 10.
    Additionally, is there a way to add bullets within the text in VBA?

    Below is the code, any feedback is highly appreciated!


    Sub Mail_Outlook_With_Signature_Html_1()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    strbody = "Good day Everyone,<br><br>" & _
    "Please see below details:<br><br>" & _
    "Time: 15:00 <br> Table: 1 <br><br> PAX: 8 <br><br>" & _
    "Allergies = None<br>"

    With OutMail
    .Display
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "Reservation"
    .HTMLBody = strbody & "<br>" & .HTMLBody


    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: VBA changes the default font size in Outlook - How to fix?

    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    10-07-2022
    Location
    Cyyprus
    MS-Off Ver
    365
    Posts
    9

    Re: VBA changes the default font size in Outlook - How to fix?

    Hi sintek,

    Unfortunately the font still comes up with size 10 with your code as well.
    In the meanwhile though, I've found this which does exactly what I need it to do:

    I appreciate the help nevertheless, Thank you!


    Sub Mail_Outlook_With_Signature_Html_1()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim StrBody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    StrBody = "Good day Everyone,<br><br>" & _
    "Please see below details<br><br>" & _
    "Time: 15:00 <br> Table: 1 <br><br> PAX: 8<br><br>" & _
    "Allergies: None <br>"

    With OutMail
    .Display
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "Reservation"
    .HTMLBody = "<BODY style=font-size:11pt;font-family:Calibri>" & StrBody & "<br>" & .HTMLBody


    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: VBA changes the default font size in Outlook - How to fix?

    Unfortunately the font still comes up with size 10 with your code as well
    Strange...Works on my side...But all good...Glad you got it sorted...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Default Font changes to other size and type
    By richard11153 in forum Excel General
    Replies: 2
    Last Post: 01-24-2022, 05:46 PM
  2. [SOLVED] Clear All vs. default font size
    By jhren in forum Excel General
    Replies: 9
    Last Post: 06-18-2013, 03:05 AM
  3. [SOLVED] Change default font and font size on COMMENTS in cells
    By Thistledown in forum Excel General
    Replies: 4
    Last Post: 11-23-2012, 09:26 AM
  4. Default Font size in comment boxes ?
    By conks in forum Excel General
    Replies: 2
    Last Post: 08-27-2008, 08:29 AM
  5. [SOLVED] How do I set Excel comments default font size
    By karene in forum Excel General
    Replies: 1
    Last Post: 05-26-2006, 06:55 AM
  6. [SOLVED] My tabs' font size is smaller - how do I restore default size?
    By katykins53 in forum Excel General
    Replies: 1
    Last Post: 01-10-2006, 08:10 PM

Tags for this Thread

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