This code works perfectly on my home PC... however when I try and run it on my work PC the image comes up with the red cross box implying it is unable to locate the image location. However, the file exists as I can navigate to it by copying and pasting the code to the picture...
I thought it may be because the image was on the network... have changed to local, though still no joy.
Driving my crazy...! Any ideas?
Sub EmailImage()
Dim OL As Object, rng As Range
Dim EmailItem As Object
Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(0)
With EmailItem
.HTMLBody = "<html><p>This is a picture.</p>" & _
"<img src=C:\Images\EMailImage.png' >"
.To = EmailTo
.CC = ""
.BCC = YouWillNeverKnow
.Subject = "*** UPDATE *** @ " & Format(Sheets("HelpMe").Range("K13"), "hh:mm")
.Display 'or use .Display (.Send to send)
End With
End Sub
Bookmarks