Outlook Determine Users default mail font style and size

Viewed 274

Good morning - I am trying to draft an email programmatically from Access to Outlook.

I believe I have properly figured how to create the email, but cannot understand how to use the users default mail message font as the font type. All messages are coming up Times New Roman, pt 12.

I've found plenty of articles on how to set the font to a certain style, but I want to use the users' default Outlook font settings.

Sub testHTML()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient

          ' Create the Outlook session.
          Set objOutlook = CreateObject("Outlook.Application")

          ' Create the message.
          Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

          With objOutlookMsg
              ' Add the To recipient(s) to the message.
'              Set objOutlookRecip = .Recipients.Add("Whatever Email")
'              objOutlookRecip.Type = olTo

             .Subject = "Testing"
             .Display

             'Create HTML body, which will contain a hyperlink
                objOutlookMsg.HTMLBody = "This is the body of the email, which contains a link to Google.  " & _
                                        "<a href='http://www.google.com'>www.google.com<a/>. " & _
                                        "Can you please help me figure out the font for the whole message?  " & _
                                        "Why does it default to Times New Roman point 12 instead of the users' default mail font?"
        End With
End Sub
3 Answers
Related