Found Here...
********************************************
Installing Ghostscript to output from Access
********************************************
Download Ghostscript 8.00 from
http://www.cs.wisc.edu/~ghost/
Install Ghostscript and make a note of the install directory.
Create a directory in the Ghostscript directory named Output
e.g. c:\gs\output
Install MakePDf in the Ghostscript directory
(Note MakePDF is not actually used from the Access functions
but is a useful standalone facility)
Create a new local printer using a postscript driver, my
personal choice is HP Deskjet 1200C/PS.
Create a new local printer port as c:\gs\output\tfile.ps
Set the spool options on the printer to print directly to the
printer. This is important otherwise Ghostscript kicks in before
the printer file is output.
Rename the printer as 'Postscript'
That finishes installing Ghostscript.
Import the Access modules supplied into your application.
If the Ghostscript version is anything other than version 8.00 then
a line in the PDF module will need to be modified:
Public Function GhostscriptIt(A_reportname, A_where)
Dim gsdir As String, gsscript As String
'gsdir MUST POINT TO THE LATEST INSTALLATION DIRECTORY OF GHOSTSCRIPT
gsdir = "c:\gs\gs8.00\"
*******************************
USING IT
*******************************
To PRINT a report to file then call the following function
SaveASpdfFile(A_reportname, A_where)
A_reportname = Report you want to output. This should be set up with the printer
set to 'Postscript' (In page setup>use specific printer).
A_where = The where condition for your report.
To EMAIL any report as a pdf attachment then call the following function
MailAsPDFAttachment(A_reportname, A_where, A_to, A_subject, A_body, A_sendnow)
A_reportname = Report you want to output. This should be set up with the printer
set to 'Postscript' (In page setup>use specific printer).
A_where = The where condition for your report.
A_to = The recipients
A_subject = The subject line for your email
A_body = Any body text you wish to add
A_sendnow = True or False. If false (or if there are no recipients) then the
email will be displayed, otherwise it will just be sent.
There are no optional parameters so if say there is no body text just use empty
quotes i.e.""
The function assumes you are using Outlook as your mail client. It has been tested
on Outlook 98 and 2000.
Please report any problems back to me via my private post at Utter Access