Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems exporting Reports to PDF format after installing a third party PDF editor

Status
Not open for further replies.

lbrw

Programmer
May 15, 2013
2
Hello,

I have a set of reports that are run automatically every morning and sent out to a number of store managers as pdf-file email attachments. The reports are run in Access 2007 and exported to pdf format in VBA:

DoCmd.OutputTo acOutputReport, "rptDailyDistOne", acFormatPDF, MyPath & MyFileName, False

MyPath and MyFileName are variables whose values are assigned earlier in the function. This morning, this line of code threw the following error message:

Run-Time error '2501':

The OutputTo action was cancelled.


I ran the reports, and they ran with no problem. It occurred to me that the installation of Nitro Pro 8 might be interfering with the export, so I changed the pdf program association back to Adobe Reader, all to no avail. The problem persists.

Does anyone have experience with this type of thing?

Thanks for your help.



 
Hello again,

Well this is embarrassing, but the problem is solved. It had nothing to do with the pdf file format or the new pdf editor; in doing some house cleaning I had inadvertently deleted the directory specified in the MyPath variable. No valid path existed.

thanks,

lbrw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top