Hello, I am attempting to insert my default signature at the bottom of some automatically generated email. The contents of my signature have been copied, however, it lost the formatting. Here is the code I used.
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.Display
End With
signature2 = OutMail.Body
With OutMail
.Subject = "Reminder - CAR(s) Upcoming Due Dates"
.To = sht.Range("B" & Rw).Value
.CC = "Example Name"
.HTMLBody = "Good Morning," & "<br>" & "<br>" & "This is a friendly reminder that you have a Corrective Action due in " & "<b>" _
& "two business days." & "</b>" & " Please let me or Example Name know if you require any additional support or would like to" _
& " request an extension." & "<br>" & "<br>" & "<b>" & "<u>" & "<span style='background:yellow;mso-highlight:yellow'>" & _
"Please request an extension today or tomorrow; extensions cannot be requested the day the action is due." & _
"</span>" & "</b>" & "</u>" & "<br>" & "<br>" & "<br>" & RangetoHTML(rngHeader) & RangetoHTML(rng) & "<br>" & "<br>" & "Thank You," & _
"<br>" & "<br>" & signature2
.Display
End With
Set OutApp = Nothing
Set OutMail = Nothing
My signature is appearing as one line with no bolding.
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.Display
End With
signature2 = OutMail.Body
With OutMail
.Subject = "Reminder - CAR(s) Upcoming Due Dates"
.To = sht.Range("B" & Rw).Value
.CC = "Example Name"
.HTMLBody = "Good Morning," & "<br>" & "<br>" & "This is a friendly reminder that you have a Corrective Action due in " & "<b>" _
& "two business days." & "</b>" & " Please let me or Example Name know if you require any additional support or would like to" _
& " request an extension." & "<br>" & "<br>" & "<b>" & "<u>" & "<span style='background:yellow;mso-highlight:yellow'>" & _
"Please request an extension today or tomorrow; extensions cannot be requested the day the action is due." & _
"</span>" & "</b>" & "</u>" & "<br>" & "<br>" & "<br>" & RangetoHTML(rngHeader) & RangetoHTML(rng) & "<br>" & "<br>" & "Thank You," & _
"<br>" & "<br>" & signature2
.Display
End With
Set OutApp = Nothing
Set OutMail = Nothing
My signature is appearing as one line with no bolding.
Last edited: