I am attempting to run the code referenced below, and am receiving a run-time error. The code executes the task and attaches the file, but still throws the error. "Cannot find this file. Verify the path and file name are correct." I've verified all components of the path and file name and they are correct. Any advice is greatly appreciated. Thank you!
Sub CreateCourseCertificates()
Dim EApp As Object
Set EApp = CreateObject("Outlook.Application")
Dim EItem As Object
Dim path As String
path = "\\path name here\"
Dim RList As Range
Set RList = Range("A2", Range("a2").End(xlDown))
Dim R As Range
For Each R In RList
Set EItem = EApp.CreateItem(0)
With EItem
.To = R.Offset(0, 2)
.Subject = "Reminder - Performance Evaluation Action Due: " & R.Offset(0, 0)
.Attachments.Add (path & R.Offset(0, 18) & ".docx")
.Body = "Hello " & R.Offset(0, 1) & vbNewLine & vbNewLine _
& "Attached is the Annual Performance Evaluation Action Chart for: " & R.Offset(0, 0) & "." _
& vbNewLine & vbNewLine & "Please reply with any questions." & vbNewLine & vbNewLine & _
"Thank you."
.Display
End With
Next R
Set EApp = Nothing
Set EItem = Nothing
End Sub