Button to PDF & save report to Desktop with a file name (1 Viewer)

fibayne

Registered User.
Local time
Today, 14:25
Joined
Feb 6, 2005
Messages
236
Hi
This may help someone looking to open a report in PDF format and save to file, with your own choice of file name.

txtPDFRef is a field that contains the filename you want, in my example it is =Format(Date(),"yyyymmdd") & " - " & "Statement " & [txtClient]

Private Sub cmdPDFInv_Click()
DoCmd.OutputTo acOutputReport, "YOUR REPORT", acFormatPDF, "C:\Users\Fiona\Desktop\PDFs\Statements\ " & Me.txtPDFRef & ".pdf", True
End Sub

Fi :)
 

Users who are viewing this thread

Top Bottom