I am trying to link a PNG file as image source for a signature - to send e-mail using vba. I am trying to adjust the size of the signature (PNG Image) as well trying to understand what a Single Quote and Double quote refers to. I need image size to be Height - 1.96 cm and width - 16.37 cm. Please advise.
"<img src ='" & relativepath1 & "'>" **<--- This one works but signature is too big**
"<img src='Image1.png'" & "width='500' height='400'>" **<-- Too small. And Image doesn't load**
Sub Mail_workbook_Outlook_1()
relativepath1 = ThisWorkbook.Path & Application.PathSeparator & "Signature99" & ".png"
'Create a new email message
Set OutlookMessage = OutlookApp.CreateItem(0)
On Error Resume Next
With OutlookMessage
'.Attachments.Add "C:\ Image1.PNG", olByValue, 0
.To = Prime_Email
.cc = cc1
.BCC = ""
.Subject = "Donor Volume - " & " " & str2 & "(" & Subject & ")"
.HTMLBody = RangetoHTML(Range("E2:N16")) & "<img src ='" & relativepath1 & "'>"
.send
'.Display
End With
On Error GoTo 0
Set OutlookMessage = Nothing
Set OutlookApp = Nothing
End Sub