Hi.
I am completely new to VBA and copied some code that automatically generates an email in Outlook.
I would like to use a picture as a signature in these emails. It would be great if I can use a picture that I have pasted in a cell in the worksheet, example A1.
Can anyone please assist?
The code I used is:
Option Explicit
Public FormulaCell As Range
Sub Mail_with_outlook2()
Dim OutApp As Object
Dim OutMail As Object
Dim strto As String, strcc As String, strbcc As String
Dim strsub As String, strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strto = Cells(FormulaCell.Row, "K").Value
strcc = ""
strbcc = ""
strsub = "Subject"
strbody = "Dear " & Cells(FormulaCell.Row, "A").Value & vbNewLine & vbNewLine & _
"Just a friendly reminder that your " & Cells(FormulaCell.Row, "L").Value & " Items will need to be replaced in a months time." & _
vbNewLine & vbNewLine & "We will contact you within the next two weeks to expedite delivery" & vbNewLine & vbNewLine & _
vbNewLine & vbNewLine & "Thank you and kind Regards," & vbNewLine & vbNewLine & _
"Sender"
With OutMail
.To = strto
.CC = strcc
.BCC = strbcc
.Subject = strsub
.Body = strbody
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks