Hey
I wish to send out of MS Access mails via Outlook using HTML files.
This went quite well using code underneath. But as soon as the HTML file contains images, these images doesn't appear in the mail body.
Who can help me with this problem ?
Thank you in advance !
For Each objAccount In Outlook.Application.Session.Accounts
If objAccount = ysender Then
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
xmessage = GetBoiler(xbodylocation)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(xrecipient)
objOutlookRecip.Type = olTo
.SendUsingAccount = objAccount
.subject = ysubject
.DeferredDeliveryTime = Now() + TimeSerial(0, 3, 0)
.BodyFormat = olFormatHTML
.HTMLBody = xmessage
If IsNull(Me![xreport]) Then
Else
Set objOutlookAttach = .Attachments.Add(xfilenaam)
End If
On Error Resume Next
.Send
End With
End If
Next
Set objOutlookRecip = Nothing
Set objOutlook = Nothing
Set objOutlookMsg = Nothing