[AccessD] Printing PDF files

John Colby jwcolby at ColbyConsulting.com
Mon Apr 17 07:00:41 CDT 2006


Stuart,

I need to actually build a file name and have each report save to that
custom directory as it is printed - all automatically.  I was able to do
that with the solution I chose but for some reason the printer driver
started hanging - at the worst possible time, over the weekend with no tech
support when the client REALLY needed to be working.

So in a nutshell, I need to be able to write code to cause the print of the
report to go to a specific directory, determined at the instant the print
happens.



John W. Colby
www.ColbyConsulting.com 


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Friday, April 14, 2006 7:36 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Printing PDF files

On 14 Apr 2006 at 17:52, John Colby wrote:

> What is involved in printing reports to adobe PDF files using the full 
> on adobe package?  My client got it and I need to mod my program to 
> print to this.
> 

Installing the full Adobe creates a printer called "Adobe PDF". It's just a
case of setting the report to print to that specific printer instead of the
default printer.

By default, Adobe  is set up to request a file name when you create the
document.  

If you want to automate printing with no user intervention, you need to
change the option "Prompt for Adobe Filename" in the printer properties
under "General - Printing Preferences... - Adobe PDF Settings"
In this case the PDF  will be printed into the default directory for the
printer and will have the same name as the report plus a .PDF extension.  
The Default directory is specified under "Properties - Ports" for the
printer.

If you want the reports saved to a different directory, you need to set up
another copy of the printer with a different default directory.

If you want a different name for the file, you need to make a copy of the
report with an appropriate name, print that copy and then delete it.

Something like:
strReportName = "DailyReport" & Format$(Date(),"yymmdd") Docmd.CopyObject
,strReportName,acReport,"rptDailyReport"
Docmd.Open strReportName
Docmd.DeleteObject acReport,strReportName

--
Stuart


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list