I have an event that creates and email that works perfect however, now I want the code to find a file on our server and insert it as an attachment. I really want to use a pdf version but here is an example of the code calling for a Word document.
The code to call the document is:
My Send obect code is a follows:
I get an error message that states "The Microsoft.Jet database engine could not find the object 'S:\Misc\Policy \What to have prepared for audit.doc'. Make sure the object exists and that you spell its name and the path name correctly.
Please note the document is located in a different folder on the same network drive that the database resides. I tried to move the document to the same folder as the database and redirect it to that folder but it still did not work.
Any suggestions?
The code to call the document is:
Code:
stDocName = "S:\Misc\Policy\What to have prepared for audit.doc"
Code:
DoCmd.SendObject acDocument, stDocName, acFormatRTF, , , , _
Please note the document is located in a different folder on the same network drive that the database resides. I tried to move the document to the same folder as the database and redirect it to that folder but it still did not work.
Any suggestions?
Comment