How to Fix Missing Acrobat References When Merging PDFs with Excel VBA
Question details
The user encounters errors when declaring Acrobat objects in Excel VBA to merge PDF files, noting that the Acrobat library is missing from the VBA References list.

- Product
- Microsoft Excel and Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Writing or executing an Excel VBA script designed to automate the process of combining multiple PDF documents using the Acrobat API.
- Observed behavior
- The VBA code fails with errors when declaring objects like CAcroPDDoc, and the required Acrobat type library does not appear in the VBA Tools > References menu.
Verify your installed Adobe software version by opening your PDF viewer and navigating to Help > About, as the required VBA API is missing in the free Adobe Reader.
Upgrade to Acrobat Pro or Standard and Enable the VBA Reference
To use the Acrobat API in Excel VBA, you must install a premium version of Adobe Acrobat (Standard or Pro) and manually add its library to your VBA project references.
The free Adobe Reader application does not include the Acrobat API necessary for interacting with objects like CAcroPDDoc. If you only have the basic Reader version installed, the required Acrobat type library will not populate in your Excel VBA references list.
Open your currently installed Adobe software, click on 'Help' in the top menu, and select 'About'. Verify whether you are running Adobe Reader, Acrobat Standard, or Acrobat Pro.
If you are using the free Reader, you must acquire and install Adobe Acrobat Standard or Pro to gain access to the Acrobat API required for VBA automation.
Launch Microsoft Excel, open your workbook, and press 'ALT + F11' on your keyboard to open the Visual Basic for Applications (VBA) Editor.
In the VBA Editor, click on 'Tools' in the top menu bar and select 'References' from the dropdown list.
Scroll down the Available References list, locate 'Adobe Acrobat xx.0 Type Library' (where xx is your version number), check the box next to it, and click 'OK'.

Use WPS Office to Merge PDF Files Natively
Instead of relying on complex Excel VBA scripts and expensive Adobe Acrobat subscriptions, you can quickly and easily combine multiple PDF documents into a single file using the built-in PDF toolkit in WPS Office.
- 1. Open WPS Office: Launch the WPS Office application and navigate to the 'PDF' section on the main home screen.
- 2. Select the Merge Tool: Click on 'Merge PDF' from the quick tools menu to open the PDF combining utility.
- 3. Add Your PDF Files: Click 'Add Files' and select all the PDF documents you wish to combine from your computer.
- 4. Merge the Documents: Drag and drop the files to arrange them in your desired order, then click the 'Merge' button to generate your single PDF file.

Frequently Asked Questions
Why does CAcroPDDoc cause a 'User-defined type not defined' error in Excel VBA?
This error occurs because the Adobe Acrobat Type Library is not referenced in your VBA project. You must enable 'Adobe Acrobat xx.0 Type Library' under Tools > References in the VBA Editor to define the objects correctly.
Can I use Adobe Acrobat Reader to merge PDFs via Excel VBA?
No, the free Adobe Reader does not include the Acrobat API needed for VBA automation. You must have a licensed version of Adobe Acrobat Standard or Pro installed on your computer.
How do I find the Tools > References menu in Excel?
First, press ALT + F11 to open the Visual Basic for Applications (VBA) editor. Then, look at the top menu bar, click on 'Tools', and select 'References' to open the library checklist.
Is there a way to merge PDFs without purchasing Adobe Acrobat?
Yes, if you do not want to purchase Acrobat just to run a VBA script, you can manually merge PDFs using affordable or free native tools like the dedicated Merge PDF feature found in WPS Office.




