Hello Everyone,
The below CODE is my (adapted from the works of Ron De Bruin) Sub that sends a Range to an HTML e-Mail for distribution to Customers. How do I ammend the below code to also include the default signature in Outlook? As it stands, signatures have to be manually added to each distributed e-Mail.
Any help would be really appreciated, and thank you.
Sub MailRangeInOutlookBody()
'Use with RangetoHTML Sub.
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
Set rng = Nothing
On Error Resume Next
'Only send the visible cells in the selection.
If Range("A4").Value <> 0 Then
Range("A3:D3").Select
Range(Selection, Selection.End(xlDown)).Select
Else: Range("A3:D3").Select
End If
Set rng = Selection.SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "The selection is not valid. " & _
vbNewLine & "You're an intelligent person. Try Again.", vbOKOnly
Exit Sub
End If
With Application
.EnableEvents = False
End With
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = Range("H2")
.CC = ""
.BCC = ""
.Subject = "FakeCompany Available Inventory for " & Range("A1").Value
.HTMLBody = "<p><o:p>" & Range("H1").Value & "," & "</o:p></P>" & "Please let me know if FakeCompany can provide any of the following items for you today." & RangetoHTML(rng)
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks