[英]VBA: Acrobat Run time error 429; ActiveX component can't create object
[英]Error:' ActiveX Cannot Create Object' When Connecting VBA to Adobe Acrobat
我試圖通過VBA將Adobe Acrobat連接到Excel。 目標是獲取PDF並將其插入Excel。
Sub Imp_Into_XL(PDF_File As String, Each_Sheet As Boolean)
'This procedure get the PDF data into excel by following way
'1.Open PDF file
'2.Looping through pages
'3.get the each PDF page data into individual _
sheets or single sheet as defined in Each_Sheet Parameter
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
Dim Ct_Page As Long 'count pages in pdf file
Dim i As Long, j As Long, k As Long 'looping variables
Dim T_Str As String
Dim Hld_Txt As Variant 'get PDF total text into array
RW_Ct = 0 'set the intial value
Col_Num = 1 'set the intial value
Application.ScreenUpdating = False
Set AC_PD = New Acrobat.AcroPDDoc 'ERROR LINE HERE
Set AC_Hi = New Acrobat.AcroHiliteList
我收到運行時錯誤429:ActiveX組件無法在設置AC_PD = New Acrobat.AcroPDDoc的行上創建對象。 我不確定是什么原因造成的。 我很確定我擁有所有正確的參考資料。 任何和所有幫助表示贊賞!
遇到此問題的任何人的答案就是購買Adobe Acrobat Pro。 由於您只能使用Pro獲得正確的正確引用,因此可以完美運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.