Upgrading from Acrobat 5 to
After several years of seeing warning messages when
opening Acrobat PDF files, I finally decided to upgrade to version 7. There are
several major consequences to this upgrade:
|The Acrobat PDFWriter and Acrobat Distiller printers
are gone. Now there is a single printer named Adobe PDF, which is functionally
equivalent to Acrobat Distiller|
|If you upgrade to the Standard edition of Acrobat 7,
you lose the ability to compare PDF files!|
There are several ways that I have used VBA code to create
Acrobat PDF files. Unfortunately, these all relied on the Acrobat PDFWriter
printer, which created smaller files than Acrobat Distiller. I had to revise
some code to get things working again.
Convert multiple Word files in a single directory into multiple PDF files
Example code - merge multiple PDF files in a single directory into a single PDF file
Multiple PDF files ==> single PDF file
This code is designed to be run in MS Excel, MS Word or MS Access.
There are one or two quirks to the program:
1. You must set the folder location you are searching in the Command1_Click event
2. The program reads a text file named "pdf.txt" to get the names of the PDF files to merge
3. You can easily create the file pdf.txt using this batch file:
REM This produces list of PDF file names
REM in sorted order (alphabetic)
dir *.pdf /B /O:N >pdf.txt
4. The program assumes the destination file already exists, and that it is named "merged.pdf"
5. If you are using Acrobat 5, you'll need to comment out a few lines in Function MergeOnePDF.
Code for Acrobat 5 and 7
November 28, 2011