Adding link for Cross-posting LINK
---
Have a try with your revised macro:
Option Explicit
Sub Email_Template1()
Dim oMailItem As Object, oOLapp As Object
Dim Word As Object, doc As Object, MsgTxt$
Dim filePath As String '<=
Dim fileName As String '<=
Set oOLapp = CreateObject("Outlook.Application")
Set oMailItem = oOLapp.CreateItem(0)
Set Word = CreateObject("word.application")
With oMailItem
.To = "Email"
.Cc = "Email"
.Subject = "Needed Confirmation"
'---------------------------------------
filePath = "F:\Test\Pdf\" '<= change as needed
fileName = Dir(filePath & "*.pdf") '<=
Do While Len(fileName) > 0 '<=
.Attachments.Add filePath & fileName '<=
fileName = Dir '<=
Loop '<=
'---------------------------------------
.HTMLBody = "test"
.Display
End With
Set oOLapp = Nothing
Set oMailItem = Nothing
End Sub