Tom Keatley
tom.p at piedpiper.com.au
Mon Apr 17 18:57:58 CDT 2006
John... Whether it is any help or not..... I have the same situation in that I have to produce invoices as a normal report (to a printer) and also produce a PDF copy which is then saved to a directory of my choosing on the fly I have built this facility into code by..... Having a table with a default printer field. Changing the default printer to my PDF utility (after saving my default printer in my field). I use Jaws Systems PDF writer although there are a LOT of these type of programs . Although I dont need it I believe the JAWS PDF utility will allow you via code to specify a directory as part of the command just as it allows you to name the file .... I then print the report to PDF which will be saved in the default directory I have set up for it. The file name is actually the caption property of the report. Then change back to the previous default printer and print the report to the printer As far as the users are concerned it is pretty transparent ...all they see is the print dialog come up for a sec while it is writing to the PDF file and then theys see the next dialog come up for the printer report... I use a printer class from ATTAC Consulting (On the fly printing? I think) to handle all printing requirements although that was because I lacked the abilities to use printer API's properly myself (which you probably dont) I can send you code snippets if you need them REgards Tom Keatley ----- Original Message ----- From: "John Colby" <jwcolby at ColbyConsulting.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Monday, April 17, 2006 8:00 PM Subject: Re: [AccessD] Printing PDF files > 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 > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.385 / Virus Database: 268.4.2/314 - Release Date: 16/04/2006 > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.385 / Virus Database: 268.4.2/314 - Release Date: 16/04/2006 > >