Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 9th, 2004, 10:27 AM
Registered User
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Adobe PDF files from VBA

I am trying to generate PDF files using Access and VBA. I am close but am not sure if there is an easy way to do this?

Old March 9th, 2004, 02:53 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

You can probably do it easily using the Print and Printer methods and by selecting Adobe Acrobat Distiller as your printer ID.

Basically, if you define your printer object and know the name of your Adobe Acrobat Distiller printer, you can set that name to strPrinter and do something like this:

rptReport.Printer = Application.Printers(strPrinter)

Then the DoCmd.OpenReport will print to the PDF.

You'll have to have Adobe Acrobat (the writer, not the reader) or your PDF-making software installed for this to work. Search help on the .Printer and .Printers methods for more details on syntax.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Old March 9th, 2004, 05:26 PM
Registered User
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for the reply Greg.
With your help I was albe to solve the problem

Old March 11th, 2004, 02:41 AM
bw bw is offline
Registered User
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Have you found a method to send the desired filename to the pdf software so that the pdf file can be "printed" and saved from VBA, without user interaction?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close Adobe after printing PDF file BoardBabe Access VBA 5 October 11th, 2011 05:26 PM
Need help w/ creating PDF files in Excel ArtDecade VB.NET 2002/2003 Basics 2 June 14th, 2006 11:06 PM
creating thumbnail for pdf files via php pritz PHP How-To 0 March 10th, 2006 04:09 AM
Creating PDF Files aldwinenriquez ASP.NET 1.0 and 1.1 Professional 3 January 12th, 2006 06:43 AM
Suppressing 'Creating Adobe PDF' dialog zorb Access VBA 1 October 13th, 2004 06:56 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.