By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,742 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,742 IT Pros & Developers. It's quick & easy.

Generate PDF with VB code in Acrobat 6.0

P: n/a
My VB Application opens an Access Report and has an option to generate the
report in PDF once the report is closed. This is accomplished by:

- Switching over to the Acrobat Printer (i.e. PDFWriter) from the default
printer.

- Setting a string type sub key "PDFFilename" in the registry
"HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter" to store the PDF in
a user selected directory with a filename that's determined by VB codes.

- Generating the PDF by issuing the command ".DoCmd.OpenReport sReport,
acViewNormal".

- Closing the report by issuing the command ".DoCmd.Close acReport,
ReportName, acSaveNo".

- Resetting to the default printer from Acrobat Printer "PDFWriter".

This works fine with Acrobat 5.0. When I recently installed Acrobat 6.0, I
managed to set the directory and name of the PDF into a string type sub key
"PDFFilename" in the registry "HKEY_CURRENT_USER\Software\Adobe\Acrobat
PDFMaker". However, I ran into a host of problems:

- Acrobat 6.0 does not recognize the filename in the string type sub key
"PDFFilename" in the registry. Instead, it uses its own default filename to
save the PDF.

- Acrobat 6.0 does not recognize the user selected directory in the string
type sub key "PDFFilename" in the registry. Instead, it saves the PDF in the
"My Documents" directory even though I left the "Location" textbox blank in
the printing preference property of Acrobat 6.0 printer "Adobe PDF" in
Window's printer setting.

Can you please show me the proper procedures to automatically generate PDF
by using Acrobat 6.0?

The methods that I used in Acrobat 5.0 to set up PDFWriter does not
work with Acrobat 6.0. Would I have to work with the registry, or
postscripts, or distiller?

Your help is greatly appreciated.

Thank you


Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Set the printer to "Acrobat Distiller" rather than "PDFWriter"?

On Thu, 19 Feb 2004 14:22:43 -0500, "Andrew" <an****@abc.ca> wrote:
My VB Application opens an Access Report and has an option to generate the
report in PDF once the report is closed. This is accomplished by:

- Switching over to the Acrobat Printer (i.e. PDFWriter) from the default
printer.

- Setting a string type sub key "PDFFilename" in the registry
"HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter" to store the PDF in
a user selected directory with a filename that's determined by VB codes.

- Generating the PDF by issuing the command ".DoCmd.OpenReport sReport,
acViewNormal".

- Closing the report by issuing the command ".DoCmd.Close acReport,
ReportName, acSaveNo".

- Resetting to the default printer from Acrobat Printer "PDFWriter".

This works fine with Acrobat 5.0. When I recently installed Acrobat 6.0, I
managed to set the directory and name of the PDF into a string type sub key
"PDFFilename" in the registry "HKEY_CURRENT_USER\Software\Adobe\Acrobat
PDFMaker". However, I ran into a host of problems:

- Acrobat 6.0 does not recognize the filename in the string type sub key
"PDFFilename" in the registry. Instead, it uses its own default filename to
save the PDF.

- Acrobat 6.0 does not recognize the user selected directory in the string
type sub key "PDFFilename" in the registry. Instead, it saves the PDF in the
"My Documents" directory even though I left the "Location" textbox blank in
the printing preference property of Acrobat 6.0 printer "Adobe PDF" in
Window's printer setting.

Can you please show me the proper procedures to automatically generate PDF
by using Acrobat 6.0?

The methods that I used in Acrobat 5.0 to set up PDFWriter does not
work with Acrobat 6.0. Would I have to work with the registry, or
postscripts, or distiller?

Your help is greatly appreciated.

Thank you


Nov 12 '05 #2

P: n/a
Thanks for replying. After I installed Acrobat 6.0, "Adobe PDF" is listed
as the printer. How do I set the printer to "Acrobat Distiller"?
Since I want to use VB codes to generate the PDF, would I have to modify the
registry just like I did in Acrobat 5.0?
"Elaine" <no******************@dced.state.ak.us> wrote in message
news:40***************@news.state.ak.us...
Set the printer to "Acrobat Distiller" rather than "PDFWriter"?

On Thu, 19 Feb 2004 14:22:43 -0500, "Andrew" <an****@abc.ca> wrote:
My VB Application opens an Access Report and has an option to generate thereport in PDF once the report is closed. This is accomplished by:

- Switching over to the Acrobat Printer (i.e. PDFWriter) from the default
printer.

- Setting a string type sub key "PDFFilename" in the registry
"HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter" to store the PDF in
a user selected directory with a filename that's determined by VB codes.

- Generating the PDF by issuing the command ".DoCmd.OpenReport sReport,
acViewNormal".

- Closing the report by issuing the command ".DoCmd.Close acReport,
ReportName, acSaveNo".

- Resetting to the default printer from Acrobat Printer "PDFWriter".

This works fine with Acrobat 5.0. When I recently installed Acrobat 6.0, Imanaged to set the directory and name of the PDF into a string type sub key"PDFFilename" in the registry "HKEY_CURRENT_USER\Software\Adobe\Acrobat
PDFMaker". However, I ran into a host of problems:

- Acrobat 6.0 does not recognize the filename in the string type sub key
"PDFFilename" in the registry. Instead, it uses its own default filename tosave the PDF.

- Acrobat 6.0 does not recognize the user selected directory in the stringtype sub key "PDFFilename" in the registry. Instead, it saves the PDF in the"My Documents" directory even though I left the "Location" textbox blank inthe printing preference property of Acrobat 6.0 printer "Adobe PDF" in
Window's printer setting.

Can you please show me the proper procedures to automatically generate PDFby using Acrobat 6.0?

The methods that I used in Acrobat 5.0 to set up PDFWriter does not
work with Acrobat 6.0. Would I have to work with the registry, or
postscripts, or distiller?

Your help is greatly appreciated.

Thank you

Nov 12 '05 #3

P: n/a
"Andrew" <an****@abc.ca> wrote:
When I recently installed Acrobat 6.0,


You could try searching at Adobe.com or at groups.google.com. I've read another
posting along the same lines stating that Adobe blew it on this issue.

Say what you will about Microsoft but Microsoft is very good at providing backward
compatibility.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #4

P: n/a
SA
Andrew:

As you've found Acrobat 6 is totally different that Acro 5's PDF writer.
Acrobat 6's Adobe PDF Printer is essentially the Distiller Printer from
Acrobat 5, updated with new functionality. Adobe has never exposed an easy
method to work with Distiller (e.g. registry or com objects) unless you
start with a postscript file (where in you can use the Distiller's com
object.)

That said, we make a VBA library that you can call from within your Access
db (by using a function wrapper, and then using the Application.Run method
to run that function from VB) that supports outputting Access reports to PDF
files, even using Acrobat 6. Its pretty easy to use with very little code.
You can find it on our web.
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

"Andrew" <an****@abc.ca> wrote in message
news:x0*******************@news20.bellglobal.com.. .
My VB Application opens an Access Report and has an option to generate the
report in PDF once the report is closed. This is accomplished by:

- Switching over to the Acrobat Printer (i.e. PDFWriter) from the default
printer.

- Setting a string type sub key "PDFFilename" in the registry
"HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter" to store the PDF in
a user selected directory with a filename that's determined by VB codes.

- Generating the PDF by issuing the command ".DoCmd.OpenReport sReport,
acViewNormal".

- Closing the report by issuing the command ".DoCmd.Close acReport,
ReportName, acSaveNo".

- Resetting to the default printer from Acrobat Printer "PDFWriter".

This works fine with Acrobat 5.0. When I recently installed Acrobat 6.0, I
managed to set the directory and name of the PDF into a string type sub key "PDFFilename" in the registry "HKEY_CURRENT_USER\Software\Adobe\Acrobat
PDFMaker". However, I ran into a host of problems:

- Acrobat 6.0 does not recognize the filename in the string type sub key
"PDFFilename" in the registry. Instead, it uses its own default filename to save the PDF.

- Acrobat 6.0 does not recognize the user selected directory in the string
type sub key "PDFFilename" in the registry. Instead, it saves the PDF in the "My Documents" directory even though I left the "Location" textbox blank in the printing preference property of Acrobat 6.0 printer "Adobe PDF" in
Window's printer setting.

Can you please show me the proper procedures to automatically generate PDF
by using Acrobat 6.0?

The methods that I used in Acrobat 5.0 to set up PDFWriter does not
work with Acrobat 6.0. Would I have to work with the registry, or
postscripts, or distiller?

Your help is greatly appreciated.

Thank you

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.