HI All .
I am using following code and it send bulk mailer with one attachment from excel sheet .
now i need add one common image in mail body in place of attachment.
I am using following code and it send bulk mailer with one attachment from excel sheet .
now i need add one common image in mail body in place of attachment.
>>> You have already noted May 2023 <<<
>>> use code - tags <<<
>>> use code - tags <<<
Code:
Sub Send_Email_with_Signature()
Dim Outlook_App As Object
Dim msg As Object
Dim sign As String
Dim i As Integer
Set Outlook_App = CreateObject("Outlook.Application")
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Data")
For i = 3 To sh.Range("C" & Application.Rows.Count).End(xlUp).Row
If sh.Range("A" & i).Value = "" Then ''Check Skip
Set msg = Outlook_App.CreateItem(0)
With msg
.display
End With
sign = msg.HTMLBody
With msg
.To = sh.Range("D" & i).Value
.CC = sh.Range("E" & i).Value
.Subject = " Wishes from Service !" & " " & "" & sh.Range("B" & i) & ""
.HTMLBody = "<big>Dear <big>" & sh.Range("C" & i).Value & "<br><br><p style='color:#0000FF;'>Greetings from XYS!</p>" & _
"<p style='color:#0000FF;'<Midium>We are grateful for your trust and support in our products and services </p>" & _
"<p style='color:#0000FF;'<Midium>Team wish you a very happy brihday.</p>" & _
"<p style='color:#0000FF;'<Midium>May this year bring you joy, peace, and success in all your endeavors..</p>" & _
sign
If sh.Range("G" & i).Value <> "" Then
End If
If sh.Range("J1").Value = 1 Then ''' check option button value
.send
Else
.display
End If
End With
Set msg = Nothing
End If
Next i
Set Outlook_App = Nothing
If sh.Range("H1").Value = 1 Then MsgBox "Done"
End Sub
Attachments
Last edited by a moderator: