T
Tom Joseph
I was using the following to include some user defined text in the message
body. The vbCrLf was working fine when the message was in text format. When
I switched to HTML, the vbCrLf instruction does not work.
Is there another approach?
Also, How do I specify a font for the HTML body in the code?
Thanks very much.
With SafeItem
.To = emails
.CC = ""
.BCC = ""
.Subject = Worksheets("eMail").Range("C117").Value & _
Format(Sheets("Main").Range("AB5").Value, "mm/dd/yy") & _
", " & Format(Sheets("Main").Range("AB6").Value) & _
" - " & Worksheets("eMail").Cells(4, i).Value
.HTMLBody = Worksheets("eMail").Range("C121").Value & vbCrLf & _
Worksheets("eMail").Range("C122").Value & vbCrLf & _
Worksheets("eMail").Range("C123").Value & vbCrLf & _
Worksheets("eMail").Range("C124").Value & vbCrLf & _
Worksheets("eMail").Range("C125").Value & vbCrLf & _
Worksheets("eMail").Range("C126").Value & vbCrLf & _
Worksheets("eMail").Range("C127").Value & vbCrLf & _
Worksheets("eMail").Range("C128").Value & vbCrLf & _
Worksheets("eMail").Range("C129").Value & vbCrLf & _
Worksheets("eMail").Range("C130").Value & vbCrLf & _
vbCrLf & _
Worksheets("eMail").Range("C134").Value & _
Worksheets("eMail").Range("C135").Value & _
Worksheets("eMail").Range("C136").Value & _
Worksheets("eMail").Range("C137").Value & _
Worksheets("eMail").Range("C138").Value & _
Worksheets("eMail").Range("C139").Value
.Attachments.Add FilenameStr
.Attachments.Add FilenameStr2
.Attachments.Add FilenameStr3
.Attachments.Add FilenameStr4
.Send 'or use .Display
End With
body. The vbCrLf was working fine when the message was in text format. When
I switched to HTML, the vbCrLf instruction does not work.
Is there another approach?
Also, How do I specify a font for the HTML body in the code?
Thanks very much.
With SafeItem
.To = emails
.CC = ""
.BCC = ""
.Subject = Worksheets("eMail").Range("C117").Value & _
Format(Sheets("Main").Range("AB5").Value, "mm/dd/yy") & _
", " & Format(Sheets("Main").Range("AB6").Value) & _
" - " & Worksheets("eMail").Cells(4, i).Value
.HTMLBody = Worksheets("eMail").Range("C121").Value & vbCrLf & _
Worksheets("eMail").Range("C122").Value & vbCrLf & _
Worksheets("eMail").Range("C123").Value & vbCrLf & _
Worksheets("eMail").Range("C124").Value & vbCrLf & _
Worksheets("eMail").Range("C125").Value & vbCrLf & _
Worksheets("eMail").Range("C126").Value & vbCrLf & _
Worksheets("eMail").Range("C127").Value & vbCrLf & _
Worksheets("eMail").Range("C128").Value & vbCrLf & _
Worksheets("eMail").Range("C129").Value & vbCrLf & _
Worksheets("eMail").Range("C130").Value & vbCrLf & _
vbCrLf & _
Worksheets("eMail").Range("C134").Value & _
Worksheets("eMail").Range("C135").Value & _
Worksheets("eMail").Range("C136").Value & _
Worksheets("eMail").Range("C137").Value & _
Worksheets("eMail").Range("C138").Value & _
Worksheets("eMail").Range("C139").Value
.Attachments.Add FilenameStr
.Attachments.Add FilenameStr2
.Attachments.Add FilenameStr3
.Attachments.Add FilenameStr4
.Send 'or use .Display
End With