Here is an example of code I have to save a file on the server as Text format. The code opens a report, focuses on it, and then outputs it as Text (saving on the server)
Code:
'example of directory
strDirectory = "\\ServerName\FolderName\" & gstrContainer & ".pdf"
'example of output code
DoCmd.OpenReport stDocName, acViewPreview, , strFilter, acHidden
DoCmd.SelectObject acReport, stDocName, False
DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF, strDirectory
DoCmd.Close acReport, stDocName
Here is what I believe your code would look like. From what I have been reading, the newer version us acFormatPDF. So there is no need to call on a PDF printer object.
Code:
DoCmd.OpenReport "Report48Hour", acViewDesign, , , acHidden
Reports!Report48Hour.Caption = strCaption
DoCmd.SelectObject acReport, "Report48Hour", False
DoCmd.OutputTo acOutputReport, "Report48Hour", acFormatPDF, "\\ServerName\FolderName\FileName.pdf", True
DoCmd.Close acReport, "Report48Hour", acSaveNo
Give that a try and see what happens. I use string variables to dynamicaly update the directory. So, depending on what record the user is currently looking at and what report they run, the directory updates and creates a file name unique to the user's report. Then an email program or a hyperlink can retrieve the report at a later time.