The images aren't actually included in the file. When you create an HTML document from word manually (as it were) images are created in seperate directories. The image tags (<img>...</img> i.e. where to look for the file) are pointed at files in these directories. These are going to be local or, worse, temporary. This is why they don't appear on other machines. The trick is to identify image file locations (image tag properties) & include them in the e-mail.
Last thing first. As far as I'm aware, there are 2 ways of to include an image in an Outlook e-mail:
1 Reference an image on a web server (you'll be prompted to display external images when the e-mail is received).
2 Embed it in the e-mail (possible security issues so the e-mail might be blocked - now or in the future).
The 1st method would involve:
a. Identifying the <img> src property.
b. Copy the file to the server.
c. Rewrite <img> src to point at the image on the server.
The 2nd method would involve:
a. Identifying the <img> src property.
b. Add that file as an attachment to the e-mail.
c. Rewrite <img> src to point at the attachment.
Steps 2 & 3 are covered here:
And now getting the images... You can use the MSHTML type library (set a reference to C:\Windows\System32\MSHTML.tlb or similar) to open your temporary HTML document and loop through all the image tags like this:
Dim objMSHTML As New MSHTML.HTMLDocument
Dim objHTMLDocument As MSHTML.HTMLDocument
dim objImageTags As IHTMLElementCollection
Dim objImageTag As HTMLImg
Set objHTMLDocument = objMSHTML.createDocumentFromUrl([Temp HTML File Path], vbNullString)
While objHTMLDocument.readyState <> "complete"
DoEvents
Wend
Set objImageTags = objHTMLDocument.getElementsByTagName("IMG")
'Loop thru' image tags
For Each objImageTag In objImageTags
---Carry out actions here using objImageTag.src ---
Next objImageTag
I used the Replace function to overwrite the instances of <img src=x> in the HTML string with <img src=y> because I was creating HTML e-mails from custom HTML files and MSHTML likes to rewrite your code(!).
In your case, I think you could rewrite each tag.src property directly and use objHTMLDocument.toString to output the result.
Let me know how you get on.