0

I'm currently using Microsoft Access 2010. Is there any way to eliminate the SaveAs Dialog Box? After running the command it displays and then when you click cancel it prints the report to the correct location. It's a nuance that it displays every time.

Public Sub PrintReportToPDF(ByRef strReport As String, ByRef FilePathandFileName As String) 

    On Error GoTo ErrHandler
    DoCmd.SetWarnings False

    DoCmd.OpenReport strReport, acViewNormal
    DoCmd.OutputTo acOutputReport, strReport, acFormatPDF,   
    FilePathandFileName & ".pdf", False, "", 0, acExportQualityPrint


ExitHere:
    DoCmd.SetWarnings True
    Exit Function

ErrHandler:
    MsgBox Err.Description
    Resume ExitHere

End Sub
Simon Adcock
  • 3,554
  • 3
  • 25
  • 41

1 Answers1

0

Never mind I got it figured out as to why the PDF Save As Dialog box was being displayed. You need to change the Configuration in the Print2Pdf software. It has nothing to do with the actual code itself.