Controlling Acrobat with VBA

B

Brad

Here is what I am trying to accomplish. I have an access report (a
form letter) which the end user generates. Each letter has two
attachments which are linked to the database in a OLE field in PDF
format. Each of the attachments has to have the record ID on them so
the user adds it using the insert header function in PDF. Then prints
the documents. Because these letters are generated very frequently,
lots of time is wasted to open each PDF, insert the header, then print
the documents. So the goal is to use Acrobat SDK Api from VBA to
grab these documents, insert the header populating it with the record
ID field, then printing the PDF files.

I have search the internet and reviewed the Acrobat SDK documentation
and am fairly sure this can be accomplished but have not been able to
get this to work. I can print the PDF without problem its the insert
header and populate with recordID that I have not figured out.

Has anybody every working with PDF files with VBA who can offer some
assistance? Any help would be greatly appreciated.
 
A

Albert D. Kallal

Any possiblity you just build the whole reprot in ms-access and then use one
of the many free approachs to turning that report into a pdf file of your
choice?

The advantages of the above approach would mean you don't have to purchase
the Adobe distiller, and even a better bonuses that you don't require adobe
to be installed on the computer for your software to run and operate
correctly (so not only saves money in terms of purchasing Adobe, it also
saves installation headaches).

there's a great pdf maker for MS access that's totally free, and it also
allows you to create pdf files directly from MS access without having to
install or use some type of printer driver. you can find it here:

http://www.lebans.com/reporttopdf.htm

Another nice advantage of the above sample code library is it allows you to
set the actual file name in code when converting a report to a pdf file.
And, again the code is considerably simpler than try to set up a printer
driver or using the Adobe distiller object libary.

So I don't have a solution to your particular coding problems, and you might
want to ask in the Adobe forms how to accomplish your goals and automate
their complex Adobe program object.

I think the simplest approach here is to simply design your reports and data
output in MS access reports, and if you then need a pdf docuemnt, then
simply convert that report to a pdf document. This approach also means that
you spend all your time freely designing your reports in the easy to use
report maker in ms-access Thus don't resort to a lot of coding and writing a
lot of code to try to update some pdf document with a system of complex and
difficult to maintain code that you likely have to change EVERY time some
type of pdf document also needs to be changed.

I find that my most mice successful projects work when I try to simplify
every step and simplified as many technologies being used in the whole
process. This simplification also improves the inherent reliability of your
applications Because you're dealing with less interaction between different
products .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top