Morning,
I have renamed the report to QuoteMain. Also, the code pasted is the entire code in use. There is plenty more i want to use but currently this is the only code associated with the button:
Code:
Private Sub Command26_Click()
DoCmd.OpenReport "QuoteMain", acViewPreview
DoCmd.OutputTo acOutputReport, "strReportName", acFormatPDF, , True
End Sub
In the first example of code it would attempt to name the PDF "test". In this one it will be "strReportName". This will be a variable in the future but right now its just text.
The file path is in my documents on my computer. If i manually create a PDF from the export ribbon then it does this with no problem.