Upgrading from Acrobat 5 to Acrobat 7

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:

bulletThe Acrobat PDFWriter and Acrobat Distiller printers are gone. Now there is a single printer named Adobe PDF, which is functionally equivalent to Acrobat Distiller
 
bulletIf 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 Word files ==> multiple PDF files

This code is designed to be run in MS Excel or MS Access. It creates an instance of Word, opens each Word document, and prints to a PDF file.

Original code for Acrobat 5 using Acrobat PDFWriter printer.
You must respond to a dialog box for each file you want converted.

Code for Acrobat 5 using Acrobat Distiller printer (this is flaky).
You must respond to a dialog box for each file you want converted.

Code for Acrobat 5 and 7 using Acrobat Distiller printer (works reliably) - and there is NO dialog box!

 

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:
@echo off
REM
REM This produces list of PDF file names
REM in sorted order (alphabetic)
REM
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

Last modified: November 28, 2011