473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Generate PDF with VB code in Acrobat 6.0

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
4 7302
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jimfortune | last post by:
I have modified my GetAcroPath function to: Function GetAcroDir() As String Const LatestVer = 7 Dim strAcroDir(LatestVer - 2) As String Dim I As Integer strAcroDir(1) = "C:\Program...
1
by: Wayne Aprato | last post by:
Tooltips in Access have not worked on my machine for a long time despite several reinstalls of the operating system and applications at fairly regular intervals. I have finally pinned down the...
3
by: lanem | last post by:
I have created an Outlook Addin using VB.NET. In it, I have added a reference to Acrobat so that I can manipulate some pdf email attachments. Along the way, in my development and testing, I lose...
4
by: William LaMartin | last post by:
I have a vb.net win form where I want to output some text to a printer. Everything works fine when printing to my laser or inkjet printers. However when I print to the Acrobat PDFWriter printer...
5
by: CDMAPoster | last post by:
I have changed how I get the shell path for Acrobat Reader based on code posted by John deKrafft. Does anyone see any problems with this code running on various Windows OS's? '--Begin Module...
21
by: Grant Edwards | last post by:
I need to be able to generate a PDF report which consists mostly of vector images (which I can generate as encapsulated Postscript, PDF, or SVG). What I need is a way to combine these figures...
10
by: Mauro | last post by:
I'm trying to use the following VB function to transform a pdf document to a tiff one: http://forums.microsoft.com/msdn/showpost.aspx?postid=1665127&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1 ...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all people, everybody, We have multiple versions of Acrobat Reader from 5.x to 8.x, I want to create a method in C# or VB.NET to check to see if the registry key for the versions...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.