I have a working cdo function that allows the user to specify a file at a location on his computer to be attached to the outgoing emails. Now I would like to add code to attach a pdf version of an Access report. I am trying to avoid opening the report, saving it as a pdf to some location and then entering that location into my the attachment address.
In order to automate the process I tried:
but without "my administrator" allowing me to save in that location, it erred. I realize I can save to a different location, but need something that will work for whomever has the program.
In order to automate the process I tried:
Code:
DoCmd.OutputTo acOutputReport, "CLGAFullList", acFormatPDF, "C:\CLGAFullList.pdf"
sAttachmentLocation = "C:\CLGAFullList.pdf"