1

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

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Tanmay Nehete
  • 2,138
  • 4
  • 31
  • 42

1 Answers1

2

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)

ReFran
  • 897
  • 8
  • 14