Hi,
I have a code to send an email (which works ok) but I need help embedding an image into the body of this email. The image needs to be from range (a2,k37).
any help is appreciate, thank you!
see email code below (which I sourced from this forum...thank you very much):
************
Sub sendmail3()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"This ECO is now APPROVED" & _
"<br><br>" & Range("a60").Value & _
"<br><br>" & Range("a61").Value & _
"<br><br>" & Range("a62").Value & _
"<br><br>" & Range("a63").Value & _
"<br><br>Click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Regards,<br>" & _
"CM" & _
"<br>NF Dept</font>"
On Error Resume Next
With OutMail
.To = Range("b77").Value
.cc = Range("b78").Value
.BCC = ""
.Subject = ActiveWorkbook.Name & "_Tooling ECO - APPROVED " & Range("a57").Value
.HTMLBody = strbody
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
************
I have a code to send an email (which works ok) but I need help embedding an image into the body of this email. The image needs to be from range (a2,k37).
any help is appreciate, thank you!
see email code below (which I sourced from this forum...thank you very much):
************
Sub sendmail3()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"This ECO is now APPROVED" & _
"<br><br>" & Range("a60").Value & _
"<br><br>" & Range("a61").Value & _
"<br><br>" & Range("a62").Value & _
"<br><br>" & Range("a63").Value & _
"<br><br>Click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Regards,<br>" & _
"CM" & _
"<br>NF Dept</font>"
On Error Resume Next
With OutMail
.To = Range("b77").Value
.cc = Range("b78").Value
.BCC = ""
.Subject = ActiveWorkbook.Name & "_Tooling ECO - APPROVED " & Range("a57").Value
.HTMLBody = strbody
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
************