hello,
please can anyone help me with my issue. I have simple vba code to sending emails from excel and I need add the signature from signature.htm file to the end of email body. I tried whatever I found but nothing works for me.
Thank you..
My basic code is:
please can anyone help me with my issue. I have simple vba code to sending emails from excel and I need add the signature from signature.htm file to the end of email body. I tried whatever I found but nothing works for me.
Thank you..
My basic code is:
Code:
Private Sub CommandButton1_Click()
sendemail
End Sub
Public Function sendemail()
On Error GoTo ende
esubject = "xxx"
sendto = "xxx"
eBody = "Dear all"
newfilename = "file.xls"
Set app = CreateObject("Outlook.Application")
Set itm = app.CreateItem(0)
With itm
.Subject = esubject
.to = sendto
.cc = ccto
.Body = eBody
.attachments.Add (newfilename)
.display
.Send
End With
Set app = Nothing
Set itm = Nothing
ende:
End Function
Last edited: