Changing the font of an email with VBA

MattC

New Member
Outlook version
Outlook 365 32 bit
Email Account
IMAP
I have an Excel file with VBA code that creates an email. One thing is does is copy a range of cells from an Excel sheet into the body of an email. The font size of the cells in Excel is 14, but when pasted into the Outlook message, the font size is 11. I cannot figure out why this is happening. If I copy & paste the range manually, the font size is 14 in the Outlook message.

I am hoping to set the font size after the paste to 14 in the VBA code, but have not been able to figure out how to do this. Here's the relevant code:

Code:
Sub CreateEmail()

Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
Dim vInspector As Object
Dim wEditor As Object

LR = Sheet18.LastRow

Set rng = ThisWorkbook.Sheets("Birthday List").Range("A3:B" & LR)
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Set vInspector = OutMail.GetInspector
Set wEditor = vInspector.WordEditor

With OutMail
    
    .To = "emailaddr@mail.xyz"
    
    .Subject = "Birthdays"
    
    wEditor.Paragraphs(1).Range.Text = "We would like to wish all our members born this month a very Happy Birthday!" & vbNewLine & vbNewLine
    
    rng.Copy
    
    wEditor.Paragraphs(3).Range.Paste
    
    .Display
    
End With

Application.CutCopyMode = False
Set rng = Nothing
Set OutApp = Nothing
Set OutMail = Nothing
Set vInspector = Nothing
Set wEditor = Nothing

End Sub

Can anyone tell me what code to add to set the font to size 14? Preferably, I'd love to do a 'Select All' via code and then set the entire email body to the same font name and font size. But I'd be happy with how to set the font size in Paragraph 3.
 
I don't do any Excel to Outlook. But once in Outlook using the Word Editor, this will change all the text in the message to a Font Name and Size.

Code:
With wEditor.Content.Font
    .Name = "Courier New"
    .Size = 10
End With

wEditor.Content is a Word Range that includes all the text in the document.
See Document.Content property and Range.Font property.
 
Similar threads
Thread starter Title Forum Replies Date
P Changing all email signatures (font, color) at once in outlook 2007 Using Outlook 2
P Changing the font that the task view shows Using Outlook 5
T Outlook Contacts ... Changing Font Size, Style, Bold, etc. Using Outlook 2
M Outlook 2016: Changing default font for Notes and Reading Pane Using Outlook 4
J Changing Contact Notes Font Outlook VBA and Custom Forms 9
C Changing font sizes in Outlook 2013 Using Outlook 0
J Changing Colors or Font Styles on the Outlook Bar Using Outlook 1
F Outlook 2010 - Default font color keeps changing frim the one I set. Using Outlook 1
J Calendar events created on iPhone automatically changing default alert from 'None' to 'Time of Event' Using Outlook.com accounts in Outlook 0
F Auto changing email subject line in bulk Using Outlook 2
K Changing the Deleted Items location in Outlook 2019 Using Outlook 2
V Outlook 2021 Can anyone explain why my Outlook views keep changing?! Using Outlook 2
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 4
S Changing Message Class Outlook VBA and Custom Forms 4
C Pop Server Changing Verizon/Aol to Yahoo Using Outlook 6
P Outlook tasks keeps changing (updating) dates that I type Using Outlook 2
e_a_g_l_e_p_i Changing where data .pst is saved to Using Outlook 3
S Changing colors of today's appointments, but not recurring ones Using Outlook 33
T Changing Sent Items location in Outlook 2019 Using Outlook 0
E Outlook view grouping keeps changing Using Outlook 3
B BCC issues after changing root folder path for gmail Using Outlook 1
M Changing the preferred order for "Put this entry in" list for adding new contacts to the Address Book Using Outlook 1
J Outlook 2010 Changing events in Outlook calendar via opening file, importing CSV Using Outlook 0
A .restrict results changing after moving to Exchange online Outlook VBA and Custom Forms 0
N Rule for "on behalf of" - with changing names Using Outlook 2
O Save attachments using hotkey without changing attributes Outlook VBA and Custom Forms 1
V Changing default date for task follow-up buttons Using Outlook 2
Gary Hile Outlook 2016 changing editor options Using Outlook 6
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
S Problems syncing emails with webmail after changing to Outlook 2016 Using Outlook 1
T Changing default Mail Account in Outlook 2016 - POP3 Using Outlook 1
S Changing notification sound for new incoming messages in Outlook 365/2016 Using Outlook 1
Stephen Weinberg Changing the mailing address checkbox Using Outlook 0
D Outlook 2013 changing iCloud reminder time? Using Outlook 0
C Changing the name of Outlook Messages saved to a folder Using Outlook 1
A Outlook.com changing appointments Using Outlook 8
B Changing CC list to .add Outlook VBA and Custom Forms 2
Diane Poremsky Changing the Message Size in Exchange Server Using Outlook 0
R changing FW: on forward Outlook VBA and Custom Forms 3
B changing Win7 default backup schedule for Previous Versions Using Outlook 0
Diane Poremsky Changing the default *.pst and *.ost sizes Using Outlook 0
P Message Class keeps changing back to IPM.Contact Outlook VBA and Custom Forms 2
C Macro to send email after changing from address and adding signature Outlook VBA and Custom Forms 1
Diane Poremsky Changing Outlook.com color schemes Using Outlook 0
R Outlook calendar appointments Free/Busy time is changing from "Busy" to "Free" Using Outlook 2
W Changing looks of emails in Outlook 2003 Using Outlook 0
L Office 365 Outlook changing default contact folder Using Outlook 0
Diane Poremsky Changing the From Domain in Office 365 Using Outlook 0
R The changing way to access information in Office 365 Using Outlook 0
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2

Similar threads

Back
Top