Попытка вставить мою подпись Outlook по умолчанию. Я не могу заставить его работать. Любые мысли по этому поводу будут оценены.
Я не могу заставить его работать с .HTML
Sub Send_email_fromexcel()
Dim edress As String
Dim subj As String
Dim message As String
Dim outlookapp As Object
Dim outlookmailitem As Object
Dim path As String
Dim lastrow As Integer
Dim x As Integer
Dim header As String
Dim header1 As String
Dim header2 As String
Dim header3 As String
Dim header4 As String
Dim header5 As String
Dim header6 As String
Dim header7 As String
Dim hearder8 As String
Dim data As String
Dim data1 As String
Dim data2 As String
Dim data3 As String
Dim data4 As String
Dim data5 As String
Dim data6 As String
Dim sig As String
x = 2
Do While Sheet1.Cells(x, 1) <> ""
Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.createitem(0)
edress = Sheet1.Cells(x, 1)
subj = Sheet1.Cells(x, 2)
header = Sheet1.Cells(1, 3)
header2 = Sheet1.Cells(1, 4)
header3 = Sheet1.Cells(1, 5)
header4 = Sheet1.Cells(1, 6)
header5 = Sheet1.Cells(1, 7)
header6 = Sheet1.Cells(1, 8)
header7 = Sheet1.Cells(1, 9)
header8 = Sheet1.Cells(1, 10)
data = Sheet1.Cells(x, 3)
data1 = Sheet1.Cells(x, 4)
data2 = Sheet1.Cells(x, 5)
data3 = Sheet1.Cells(x, 6)
data4 = Sheet1.Cells(x, 7)
data5 = Sheet1.Cells(x, 8)
data6 = Sheet1.Cells(x, 9)
outlookmailitem.To = edress
outlookmailitem.cc = ""
outlookmailitem.bcc = ""
outlookmailitem.Subject = subj
outlookmailitem.body = "Good afternoon," & vbNewLine & " " & vbNewLine & "I'm just reaching out because we are attempting to process rewards for customers that were referred using the Lawn Doctor Referral Rewards Program,… I have put it in this email." & vbNewLine & "Please update your records accordingly by going into …(s). Please let me know when this has been completed and I will push their Amazon Gift Card out." & vbCrLf & header & " " & header2 & " " & header3 & " " & header4 & " " & header5 & " " & header6 & " " & header7 & " " & header8 & _
vbCrLf & data & " " & data1 & " " & data2 & " " & data3 & " " & data4 & " " & data5 & " " & data6 & _
vbCrLf & vbNewLine & "Regards"
outlookmailitem.display
outlookmailitem.send
lastrow = lastrow + 1
edress = ""
x = x + 1
Loop
Set outlookapp = Nothing
Set outlookmailitem = Nothing
End Sub