sending HTML-Mail with images and not using ActiveDocument.send
I tried to send a document as a HTML-mail, but I can only send a Mail
without pictures or cliparts. These images
have dead links to a subfolder and I dont know how to put then direct into a
mail. I use ActiveDocument.send and type the Mailadress manual Word is able
to send the document with images.
Does anybody know how I can send a HTML-mail with images / elements via
VBA-marco without typing the mail adress for each recipient.
My used code is the following:
Dim outApp As Object
Dim outMAPI As Object
Dim outFolder As Object
Dim outMail As Object
Dim Code As String
Set outApp = CreateObject("Outlook.Application")
DoEvents
Set outMAPI = outApp.GetNamespace("MAPI")
Set outFolder = outMAPI.GetDefaultFolder(4)
Set outMail = outFolder.Items.Add
With outMail
.Subject = "Mail mit VBA versenden"
.Attachments.Add ActiveDocument.FullName, 1, 50, "Mein Test (Falk)"
Code =
ActiveDocument.HTMLProject.HTMLProjectItems(ActiveDocument).Text
.htmlbody = Code
.Send
End With
'I don't want to close Outlook
'outApp.Quit
Set outApp = Nothing
DoEvents