我正在将 pdf 导出到 excel,但有些我无法在我的 vba 代码中为 Acrobat.AcroPDDoc 创建对象
我的vba代码在
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
在为 AC_PD 创建新对象时,它显示无法创建 ActivX 组件无法对象如何解决此问题。
先感谢您
最佳答案
要创建 Acro 对象,您必须使用 AcroExch。
所以使用:
设置 AC_PD = CreateObject("AcroExch.PDDoc")。
你会在这个网站上找到很多很多的例子。
如果您拥有完整的 Adobe Acrobat 版本(不是仅限 Reader),一切都会正常工作
关于excel - 无法在 VBA 中创建 Acrobat.AcroPDDoc 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54925598/