Hello,
I'm working with the email function of Access and I have it settup to email with an attachment. I have confirmed over and over that the file path I am telling it to use is correct but I continue to get this error described above.
Here is a copy of the code I am using.
Private Sub EmailRemediation_Click()
Dim strInput As String
Dim strMsg As String
Dim strGetFilePath As String
Dim strGetFileName As String
strGetFilePath = "\\AHCDFS.AHC.UFL.EDU\FILES\DN\PERSONAL\stephenpaol ini\Desktop\Send Remediation\TabulaRasa.docx"
strGetFileName = Dir(strGetFilePath)
strMsg = "What email would you like to send to?"
strInput = InputBox(Prompt:=strMsg, title:="Prompt Email")
Email_Bcc = strInput
Email_Body = "Sad things"
Email_Subject = "Remediation Notice"
On Error GoTo debugs
Set Mail_Object = CreateObject("Outlook.Application")
Set Mail_Single = Mail_Object.CreateItem(0)
With Mail_Single
.Subject = Email_Subject
.To = Email_Send_To
.cc = Email_Cc
.BCC = Email_Bcc
.Body = Email_Body
.Attachments.Add (strGetFileName)
.send
End With
debugs:
If Err.Description <> "" Then MsgBox Err.Description
End Sub
Is there something else I should be looking at to figure out why this error keeps coming up?