• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to Insert Signature when sending email thorugh outlook 2013

Dexter77

New Member
Good day professionals
I'm using the following VBA code to automatically send mass emails through MS outlook, however my signature is not showing, seeking your support to add the VBA portion to the below code so I can send mass emails with signature and logos:

Code:
Sub send_email()

Dim sh As Worksheet

Set sh = ThisWorkbook.Sheets("Sheet1")

Dim OA As Object

Dim msg As Object

Set OA = CreateObject("Outlook.Application")

Dim each_row As Integer

Dim last_row As Integer

last_row = Application.WorksheetFunction.CountA(sh.Range("B:B"))

For each_row = 2 To last_row

Set msg = OA.createitem(0)

msg.To = sh.Range("B" & each_row).Value

first_name = sh.Range("C" & each_row).Value

last_name = sh.Range("D" & each_row).Value

msg.cc = sh.Range("E" & each_row).Value

msg.Subject = sh.Range("F" & each_row).Value

msg.body = sh.Range("G" & each_row).Value

date_to_send = sh.Range("I" & each_row).Value

date_to_send = Format(date_to_send, "dd/mm/yyyy")

Status = sh.Range("J" & each_row).Value

current_date = Format(Date, "dd/mm/yyyy")

If date_to_send = current_date Then

If sh.Range("H" & each_row).Value <> "" Then

msg.attachments.Add sh.Range("H" & each_row).Value

Cells(each_row, 9).Value = "Sent"

Content = Replace(msg.body, "<>", first_name + " " + last_name)

msg.body = Content

msg.send

Else

Cells(each_row, 9).Value = "Sent"

Content = Replace(msg.body, "<>", first_name + " " + last_name)

msg.body = Content

msg.send

End If

End If

Next each_row

End Sub
 
Last edited by a moderator:
Thanks [U]Chihiro[/U]

Yes I had the chance to read it, however I'm not that expert in VBA coding, so I couldn't figure out What to place Where in my code :)

Appreciate your support in this regard especially my default signature contains 4 logos.
 
Good morning Dears

I know you are so busy replying other quires, I just would like to follow up for an update if any

Thanks alot
 
Back
Top