Solved

Automatic (VBA) creation of Adobe PDF (v.6) from MS Access (2003) report.

Posted on 2004-08-02
16
919 Views
Last Modified: 2013-12-03
I have pursued and tried to understand the various “fragmented” solutions, advice and work a-rounds currently on file, but none provide a clear “Step by Step” coding solution for my problem which is:

A solution using MS Access (2003) Forms, Reports and VBA code etc. that will enable a User to open a "Print report" form dialog box with a “Print, save and email” option that will Automatically, background print the selected report directly to Adobe Acrobat Writer .pdf (V.6) and which will automatically (without any further user input) create (if new) and or save the pdf document using information (Drive Name, Path, Folder Name and  File Name) pulled from a  reference table with the current MS access database.

0
Comment
Question by:7dud
  • 6
  • 4
  • 3
  • +2
16 Comments
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
Try my example on
www.almosawe.ae/jaffer/pdf-Report.zip
Which includes everything you will require.

jaffer
0
 

Author Comment

by:7dud
Comment Utility
Thanks for the quick response.

Is there any way to do it without using "Ghostscript" and "Makepdf"? I would prefer to solve the problem using only MS Access 2003 and Adobe Acrobat Reader V6.

Also the finished product will be part of a MS app that we will be run on 10-20 networked machines and the extra time and administration overhead to install "Ghostscript" and "Makepdf" etc. on all computers, isn't desirable.

Jeromy
0
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
Jeromy

From what I read, there is no direct way with Adobe Acrobat Reader, thats when I found this solution and modified it and made to the public.

I think the only way to do with Adobe Acrobat Reader, is, when the save as dialog popup, you can use Sendkey commands to fill the dialogs automatically, but it is not adviseble, especially with muliti users.

You still have to install Adobe Acrobat Reader on every PC, Right?
You don't need Makepdf, its just an interface if you want to use Ghostscript directly, so you only need to install Ghostscript.

Besides, try to put Ghostscript on the server and point to it in the code, as the code needs the exact path of Ghostscript anyhow.

jaffer
0
 

Author Comment

by:7dud
Comment Utility
Dear Jaffer,

Thanks once again for the quick reply. Your suggestions are well taken and failing the availability of any other solution, I will probably implement your solution.

Just as a side note I mis-typed when I said "Adobe Acrobat Reader" I meant the full version of "Adobe Acrobat Writer" (and distiller if needed)

If I have the AA Writer v6 SDK, would that help?

Being inherently lazy, I’m trying to cut out as much configuration/Administrator work as possible.

Cheers
Jeromy (A Kiwi, living in Thailand)
0
 
LVL 2

Expert Comment

by:sigs66
Comment Utility
Hi

I had a similar problem and my work around involved a piece of software called pdf995. I was able to output the access report to pdf reliably and the pdf995 printer can be set up as a network printer.

I know it is not want you want but it gets aroud all the problems you mentioned

Cheers Steve
A kiwi living in NZ
0
 

Author Comment

by:7dud
Comment Utility
Steve,

1. Can you provide implimentation details?
2. Location of the "pdf995" site.
3. Any problems encountered?
4. Have you looked at Jaffers solution?

Jeromy
(Born in Ashburton, schooled in Christchurch, in Thailand since late 70's)

0
 
LVL 2

Expert Comment

by:sigs66
Comment Utility
Implementation is pretty straight forward go and look at www.pdf995.com is the site and they have a free version

try it see how it goes - you may need to check their developers FAQ

The one problem I encountered was that my code was faster than the printer - so I had program a delay into the code.

I have not looked at jaffer's solution

Cheers
Steve
0
 
LVL 1

Expert Comment

by:fcomte
Comment Utility
Hi,
Just want to warn you : dont use pdf995 on a terminal server (win2000 TS). Even if the company says it works fine, there are a lot of problems.
Fred
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:7dud
Comment Utility
Dear Fred,

Thanks for the warning, advice well taken.

Jeromy
0
 

Author Comment

by:7dud
Comment Utility
Dear Jaffer,

Have been able to get your solution working OK. Is there any way to save the resultant .pdf in colour instead of B&W? I checked the postscript settings and colour isn't an option.

Jeromy
0
 
LVL 27

Accepted Solution

by:
jjafferr earned 500 total points
Comment Utility
Jeromy

I am glad its working for you,
Color and Resolution (dpi) depends on the postscript printer you choose,
so, Yes color is an option.

jaffer
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
You may wish to study FreePDF:

  http://freepdfxp.de/fpxp.htm

It is totally free and uses Ghostscript and the Apple Postscript driver which is capable of handling colour.
Be sure to download the "Administration Manual" as well as the sources (some basic code samples) and perhaps even the multidocument option.

/gustav
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
Did this work for you?

/gustav
0
 

Author Comment

by:7dud
Comment Utility
Solution from Jaffer is working OK, so am sticking with that. Consequently didn't really check yours out.
Still would prefer a direct native adobe/Access solution, but "You can't always get what you want, but I try"
7DUD
0
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
Hi 7DUD

Could you please press on accept button next to the answer that solved your problem and close the question,

thanks,

jaffer
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
Well, 7DUD (not 7 dudes I hope!), if you find the ideal solution, feel free to post back here so we all learn.
If Jaffer's solution works for you - be it permanently or as a work-around - you should accept his answer.

/gustav
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now