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.
' 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.