Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2003, 12:25 AM
Registered User
 
Join Date: Jun 2003
Location: Auckland, , New Zealand.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing reports in pdf format

Hi there

Has anyone out there figured out how to automate the process of printing Access reports to pdf (Acrobat Reader) format?

Cheers
Anish
Reply With Quote
  #2 (permalink)  
Old June 30th, 2003, 06:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you install Adobe Acrobat, it will install "virtual" printers named Acrobat Distiller and PDFWriter. Sending report output to either of these "printers" will create a PDF file. Note that PDFWriter is for use with reports that contain only text, while distiller will handle images as well.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply With Quote
  #3 (permalink)  
Old June 30th, 2003, 05:40 PM
Registered User
 
Join Date: Jun 2003
Location: Auckland, , New Zealand.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for that Jeff. I've got the virtual drivers setup. I somehow need to automate the report printing to pdf in VBA.

I've got a report setup up where I pass a ClientID as a parameter to generate a report. I've got about 50 clients and was thinking of writing code that could save the pdf file under each client name, and loop through all 50 clients.
Reply With Quote
  #4 (permalink)  
Old October 5th, 2004, 02:09 PM
Registered User
 
Join Date: Oct 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

keshavan01,
I'm just wonder if you have the solution of how to do this. I am having the same problem. I couldn't automatically sending the Access report to the PDF virtual printer. It asked me to enter the file nam every time. if you could send me the solution I would very appreciated
thanks


Reply With Quote
  #5 (permalink)  
Old January 27th, 2005, 06:38 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have exactly the same problem - if anyone comes up with the solution - I will be thrilled !. At present I generate them as .snp reports and then when you one those and print to a Virtual printer it has the name there with the directory which you have to change - not ideal but a stop gap measure.

Reply With Quote
  #6 (permalink)  
Old January 27th, 2005, 12:21 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Well, I know that these registry settings can be used with some versions, but I don't think all. You can change them each time you print based on your reports:

Names the file:
HKCU\Software\Adobe\Acrobat\PDFWriter, PDFileName, C:\YourReport.pdf

Prevents file naming dialog from appearing:
HKCU\Software\Adobe\Acrobat\PDFWriter, bExecViewer, 0

Also, this will prevent the dialog in V6:
HKCU\Software\Adobe\Acrobat\PDFMaker\6.0\Global\Se ttings\PromptForPDFFilename, 0

You can make registry settings from within Access. Don't forget to set them back when you are done printing.

Then if you want to name your files, you could capture all your client IDs, then use the UBound for a loop counter, and then loop through all their names, use their names to name the files, and then maybe append a date as part of the filename, etc.

I hope this will get you started. In can be done.


mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
printing a php file in .pdf format farukcse Pro PHP 0 November 18th, 2007 03:13 PM
Printing to a PDF hathcock Access VBA 3 September 29th, 2006 10:46 PM
capturing printing settings when printing reports nikolaosk Access VBA 0 February 8th, 2005 04:14 AM
Sending Access Reports to PDF Format jhartwick Access VBA 1 May 2nd, 2004 08:00 PM
PDF Printing matt.fields Crystal Reports 0 April 30th, 2004 10:33 AM



All times are GMT -4. The time now is 07:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.