Problem when export a report to a pdf file

E

Etienne Bar

I use the following code to export a report to a pdf file :

' Open report as hidden
DoCmd.OpenReport p_NomEtat, acViewPreview, , p_CondtionWhere, acHidden

' Print toPDF
DoCmd.OutputTo acOutputReport, p_NomEtat, acFormatPDF,
p_NomFichierAvecChemin, p_OuvrirDsReader

' Close Report DoCmd.Close acReport, p_NomEtat

The second line (docmd.outputto) isn't working with a error (Error n° 2501 :
Action cancelled)

Please notice that i've got another message (""File Opened by another user"
which of course is wrong as the file is a new file.) when trying to export
the report with the "export to" command with the contextual menu while i
preview the report.

I've got the same problem with word when generating à pdf.

Repair Office 2007 solves the problem... for the 3 or 4 first exports.

If someone knows a way to solve this problem with another export to pdf
tool, i would be also very happy.
 
E

Etienne Bar

Hi, it's me again.

This code is working perfectly... when the antivirus software is not running !

I tried it in a virtual machine (without Antivirus) and it works perfectly.

Disabling the AV Software solves the problem.

Hmmm... Think it's time to change !
 

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

Top