I have a VBA script that that generates and email when a VBA button is pushed in a given worksheet.
The script currently generates the email in a relatively small font. I was wondering if there is a way to set the font to Calibri, and the text sive to exactly 11.
Here is the current VBA script:
Private Sub CommandButton1_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim strUser As String
Dim signature As String
Dim sTo As String
Dim sCC As String
'For To field
Set emailRng = Worksheets("Send Email").Range("D3:I6")
For Each cl In emailRng
sTo = sTo & ";" & cl.Value
Next
sTo = Mid(sTo, 2)
'For CC field
Set emailRngCC = Worksheets("Send Email").Range("D8:I11")
For Each cl In emailRngCC
sCC = sCC & ";" & cl.Value
Next
sCC = Mid(sCC, 2)
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.Display
End With
signature = OutMail.HTMLBody
strbody = "Good Morning;
We have completed our main aliasing process for today. All assigned firms are complete. Please feel free to respond with any questions.
Thank you."
With OutMail
.SentOnBehalfOfName = ""
.To = sTo
.CC = sCC
.BCC = ""
.Subject = "Data Morning Alias Process - COMPLETE"
.HTMLBody = strbody & signature
.Display
End With
End Sub
I know that this portion of the code:
strbody = "Good Morning;
We have completed our main aliasing
is the portion that relates to the email body text size. But a setting of 3 is to small, and a setting of 4 is too big. So I was just wondering if there is some way I can set the font to be exactly size 11, and the text to be formatted as Calibri?
Thank you!