Hi Guys,
I have below macro works fine for sending emails, but i have about 200 different people on Excel sheet. Email addresses are on Column B2:B202
I need to add the missing codes in order to read B2:B202 mail addresses.
Could anyone help please?
Thanks
Benjamin
Sub Mail_Outlook_With_Signature_Html()
' Don't forget to copy the function GetBoiler in the module.
' Working in Office 2000-2010
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = ""
'Use the second SigString if you use Vista as operating system
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\Mysig.htm"
'SigString = "C:\Users\" & Environ("username") & _
"\AppData\Roaming\Microsoft\Signatures\Mysig.htm"
If Dir(SigString) <> "" Then
Signature = (SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "/ Important: Change on Payment Terms "
.HTMLBody = strbody & "<br><br>" & Signature
'You can add files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks