Inserting attachment, as opposed to attaching with VBA Module

Joined
Jun 15, 2012
Messages
11
Reaction score
0
Hello everyone - I have another question I would like some input on. I'm currently setting up an emailing system through the use of Access macros linked to VBA modules. I would like the emails with attachments to come up with the attachment inserted into the body of the text, instead of attached to the message underneath the subject line. This is what I'm using now:

Dim objOutlook1 As New Outlook.Application
Dim objMessage1 As MailItem, strAllOpen As String

strAllOpen = "C:\Users\Me\Documents\Reports\All Open.xps"

Set objMessage1 = objOutlook1.CreateItem(olMailItem)
With objMessage1
.To = "(Outlook Distribution List)" <---(Still looking to solve this in another thread)
.Subject = "Daily All Open Update"
.Body = "Good morning everyone, here is the All Open report."
.Attachments.Add strAllopen
.Display
End With
Set objOutlook1 = Nothing
Set objMessage1 = Nothing


....and this guy attaches it under the subject line, which is the traditional way. Let me know- thanks everyone!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top