I have been trying to create an automailer in excel but the signature does not come up when I try to send it out. This is the VB script:
Sub Send_email_fromexcel()
Dim OApp As Outlook.Application, outlookmailitem As Outlook.MailItem, signature As String
Dim edress As String
Dim subj As String
Dim message As String
Dim filename As String
Dim OApp As Object
Dim outlookmailitem As Object
Dim signature As String
Dim myAttachments As Object
Dim path As String
Dim lastrow As Integer
Dim attachment As String
Dim x As Integer
x = 2
Do While Sheet1.Cells(x, 1) <> ""
Set OApp = CreateObject("Outlook.Application")
Set outlookmailitem = OApp.createitem(0)
Set myAttachments = outlookmailitem.Attachments
path = "H:\Marketing\"
edress = Sheet1.Cells(x, 1)
cc = Sheet1.Cells(x, 3)
subj = Sheet1.Cells(x, 4)
filename = Sheet1.Cells(x, 5)
body = Sheet1.Cells(x, 6)
attachment = path + filename
signature = outlookmailitem.body
'With outlookmailitem
outlookmailitem.To = edress
outlookmailitem.cc = cc
outlookmailitem.bcc = ""
outlookmailitem.Subject = subj
myAttachments.Add (attachment)
outlookmailitem.display
outlookmailitem.body = body & vbNewLine & signature
' outlookmailitem.send
lastrow = lastrow + 1
edress = ""
x = x + 1
Loop
Set OApp = Nothing
Set outlookmailitem = Nothing
End Sub