OutputTo PDF error 2501 The OutputTo action was cancelled



Using Access 2007, I am trying to write a procedure to step through a
recordset of names and output a report in PDF format with relevant
information for each name.

Printing to a report with DoCmd.OpenReport works okay, but printing to PDF
generates an error message.

DoCmd.OutputTo objectType:=acOutputReport, ObjectName:=strRptName,
OutputFormat:=acFormatPDF, OutputFile:=strPDFFileName, AutoStart:=True,

Error 2501 The OutputTo action was canceled.

I could not find this error message on the Microsoft Support website.

What can I do to fix this?



I forgot to mention that I do have the PDF/XPS add-in installed and can save
a report in PDF format using MS Access menu commands. I need help automating
that process in VBA.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question