Access Reports to PDF format

jtvcs

Registered User.
Local time
Today, 10:41
Joined
Apr 10, 2003
Messages
97
We've been looking at two products which allow selection to print PDF files from an Access Report when printing. What we would like to know has anybody used either of these products and most importantly can either (or another) be programmed using a macro or VB code to bypass the SAVE AS window ? Thanks for your answers.
 
Access Reports to PDF format questions

Hello,

I am stuck hereSee below)

I put this is my module;
Public Function GhostscriptIt(A_reportname, A_where)
Dim gsdir As String, gsscript As String
gsdir = "c:\gs\gs8.50\"
End Function

Public Function SaveASpdfFile(A_reportname, A_where)
A_reportname = "rptFirstRFQsend"
A_where = Forms![frmFirstRFQ]![RFQTWAID]

Public Function MailAsPDFAttachment(A_reportname, A_where, A_to, A_subject, A_body, A_sendnow)

End Function


This is the code I use to attach and send an RTF report:

strDocName = "rptFirstRFQsend"
strMailSubject = "New RFQ for P/N" & Forms!frmFirstRFQ!PartNo + " - " & Forms!frmFirstRFQ!InstrList!OriginalItemText
strMsg = "The attached RFQ has been requested. If applicable, please check your RFQ Inbox."
DoCmd.SendObject ObjectType:=acSendReport, _
ObjectName:=strDocName, outputformat:=acFormatRTF, _
To:=Forms!frmFirstRFQ!cmbToolEng, Subject:=strMailSubject, MessageText:=strMsg


Am I close?
Thank you.
Ken
 
Here's a quick and easy way if you already have Acrobat Standard or Pro installed on your system:

' Set printer to Adobe PDF
Set Application.Printer = Application.Printers("Adobe PDF")

'Open report in (my default is print view)
DoCmd.OpenReport "rptSvcList"

' Reset printer to default
Set Application.Printer = Application.Printers(0)


To bypass the "Save As" window, you'll need to set up a new port on your printer. To do this, go to the printers control panel, right click on Adobe PDF, and click properties. From there, go to the Ports tab, and add a new port, typing in the name of the folder where you want the PDFs saved. You have to have one PDF folder, it cannot change over and over without prompting.

Once you have that, go back to the printer control panel, right click, and this time click on "Printing Preferences." Uncheck the Prompt for PDF Filename box, and this will allow you to save in a default folder.

If you need to have a different folder every time, just program VBA to move the file once it's printed. You'll have to tell VBA to check every 5 seconds or so to see if the file has been created before telling it to move the file.
 

Users who are viewing this thread

Back
Top Bottom