Cross posted at
Reload this Page Attaching all PDFs in folder to Outlook email using Word VBA
and
Attaching all PDFs in folder to Outlook email using Word VBA - Excel VBA / Macros - OzGrid Free Excel/VBA Help Forum
That's fairly straightforward e.g.
Code:
Dim oMailItem As Object, oOLApp As Object
Dim Word As Object, doc As Object, MsgTxt$
Dim strFile As String
Const strPath As String = "C:\Path\"
Set oOLApp = CreateObject("Outlook.Application")
Set oMailItem = oOLApp.CreateItem(0)
'Set Word = CreateObject("word.application") '?
With oMailItem
.To = "Email"
.CC = "Email"
.Subject = "Needed Confirmation"
strFile = Dir$(strPath & "*.pdf")
While strFile <> ""
.Attachments.Add strPath & strFile
strFile = Dir$()
Wend
.HTMLBody = "test"
.Display
End With
Set oOLApp = Nothing
Set oMailItem = Nothing