(Solved) – VBA Inserting link(from cell) as image in Email

(solved)-–-vba-inserting-link(from-cell)-as-image-in-email

I’m trying to create an email for customers and embed an image that is linked to a site. The link will be different for each customer, but the link will always appear in the same cell(AH7). The image will always be the same and is saved in “C:Fake FolderFake SubFolderimage.png”, I can also upload image online if it makes it easier/will be displayed consistently.

I can’t seem to make it happen, my below code is probably quite a way off as I can only find bits and pieces of information but nothing that works all together, any help is hugely appreciated.

    Sub Mail_workbook_Outlook_1()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim xStrBody As String
        xStrBody = "Hi" & This Workbook.Sheets("Sheet1").Range("A1") _
              & "Please Click" & "C:Fake FolderFake SubFolderimage.png" "Thank you" & "
" _ Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .to = ThisWorkbook.Sheets("Sheet1").Range(J1) .Subject = "Test Email" .Body = "Hi there" .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *