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

fibayne

Registered User
Joined
Feb 6, 2005
Messages
235
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 (Users: 0, Guests: 1)

Top Bottom