Home » excel » excel – unable to create Acrobat.AcroPDDoc object in VBA

excel – unable to create Acrobat.AcroPDDoc object in VBA

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am exporting the pdf to excel, but some how I am unable to create the object for Acrobat.AcroPDDoc in my vba code

imported reference the below mentioned lib

my vba code in

Dim AC_PD As Acrobat.AcroPDDoc              'access pdf file
Dim AC_Hi As Acrobat.AcroHiliteList         'set selection word count
Dim AC_PG As Acrobat.AcroPDPage             'get the particular page
Dim AC_PGTxt As Acrobat.AcroPDTextSelect    'get the text of selection area

Dim WS_PDF As Worksheet
Dim RW_Ct As Long                           'row count
Dim Col_Num As Integer                      'column count
Dim Li_Row As Long                          'Maximum rows limit for one column
Dim Yes_Fir As Boolean                      'to identify beginning of page

Li_Row = Rows.Count


Set AC_PD = New Acrobat.AcroPDDoc
Set AC_Hi = New Acrobat.AcroHiliteList

while creating the new object for AC_PD it show unable to create ActivX component can’t Object how to resolved this issue.
Thank you in Advance

How to&Answers:

To create an Acro-object you have to use AcroExch.
So use:
Set AC_PD = CreateObject(“AcroExch.PDDoc”).
You will find many, many more examples on this site.
All will work, if you have the full Adobe Acrobat version (not Reader only)