現在、Microsoft Access 2010 を使用しています。[名前を付けて保存] ダイアログ ボックスを削除する方法はありますか? コマンドを実行すると表示され、[キャンセル] をクリックするとレポートが正しい場所に出力されます。毎回表示されるニュアンスです。
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