multiple attachments to Outlook email by ACCESS VBA

NT100

Registered User.
Local time
Tomorrow, 02:22
Joined
Jul 29, 2017
Messages
148
Hi

I intend to attach a word file, a pdf file to an Oultook with the following ACCESS VBA,

I list partial scripts as follows and i don't know how I can attach more than more file to the Outlook mail.

Set outMail = outApp.CreateItem(olMailItem)
outMail.Attachments.Add _
Source:="c:\FMTS\Attachments\New_Curriculum.pdf", _
Position:=1, DisplayName:="New Curriculum"

Besides, How can I prepare an email contents of HTML feature that allows me to put an image there.

Thanks in advance.
 
Code:
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.createitem(olmailitem)

With oMail
    .To = pvTo
    .Subject = pvSubj
    .Body = pvBody
    
    .Attachments.Add "c:\FMTS\Attachments\New_Curriculum.pdf", olByValue, 1  
    .Attachments.Add "c:\FMTS\Attachments\New_Curriculum.doc", olByValue, 1
    .Attachments.Add "c:\FMTS\Attachments\New_Curriculum.xls", olByValue, 1

    .Display True
    .Send
End With
 
See this link for embeded image in email. [URL="http://excel-macro.tutorialhorizon.com/excel-vba-send-mail-with-embedded-image-in-message-body-from-ms-outlook-using-excel/[/URL]
 

Users who are viewing this thread

Back
Top Bottom