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?
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
This question generated 27 answers. To proceed to the answers, click here.
This thread is current as of September 22, 2014.