Hi Guys,
Im trying to add a signature to the code below which relates to ANYONE sending out this email so need the code to look at whoever would send this out and insert the correct signature? Any ideas?
Im trying to add a signature to the code below which relates to ANYONE sending out this email so need the code to look at whoever would send this out and insert the correct signature? Any ideas?
Code:
Sub CreateMail()
Dim objOutlook As Object
Dim cell As Range
Set objOutlook = CreateObject("Outlook.Application")
For Each cell In Range("A2", Range("A" & Rows.Count).End(xlUp))
If UCase(cell.Range("G1").Value) = "YES" Then
With objOutlook.CreateItem(0)
.To = cell.Value
.CC = cell.Range("C1").Value
.Attachments.Add cell.Range("D1").Value
.Subject = cell.Range("E1").Value
.body = cell.Range("H1").Value
.Display 'Instead of .Display, you can use .Send to send the email _
or .Save to save a copy in the drafts folder
End With
End If
Next cell
Set objOutlook = Nothing
End Sub