How to merge two pdfs in acrobat 9 by vba

Written by christopher hanson
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to merge two pdfs in acrobat 9 by vba
VBA automates the process of merging PDF files. (document image by AGphotographer from

Visual Basic Applications, or VBA, is a programming language used for modifying existing programs. Adobe Acrobat is a program used to view and manipulate Portable Document Format, or PDF, files. The Visual Basic editor, or VBE, in Microsoft Excel enables programmers to access the framework of a program and edit the user interface of the program. Thus, Excel's VBE allows programmers to create buttons that access the Acrobat framework but perform functions that aren't available in Acrobat---in this case, merging two PDFs.

Skill level:

Other People Are Reading


  1. 1

    Launch Microsoft Excel by clicking "Start," "All Programs," "Microsoft Office Suite," "Excel."

  2. 2

    Open the developer environment by clicking the "Developer" tab at the top of the Excel window.

  3. 3

    Insert a button. Click "Insert," "Control" then select a button and drag it onto the main panel of the development window. A dialogue box labelled "Assign Macro" will appear on the screen. Click "Add" and the VBE will appear.

  4. 4

    Enable the Acrobat framework libraries. Click "Tools" then "References." A dialogue box will appear. From the list provided, select "Acrobat" and click "OK."

  5. 5

    Copy and paste the PDF merger code (see Resources) to the VBE.

  6. 6

    Change "C:\temp\Part1.pdf" to the path of the first PDF you would like to combine.

  7. 7

    Change "C:\temp\Part2.pdf" to the path of the second PDF you would like to combine.

  8. 8

    Change "C:\temp\MergedFile.pdf" to the path of the combined PDF you are creating.

  9. 9

    Save the document by clicking "File," "Save." You will be prompted for a name, type "Excel Macro-Enabled Workbook", then press "Enter."

  10. 10

    Click the button to merge the two PDFs.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.