excel - 无法在 VBA 中创建 Acrobat.AcroPDDoc 对象

标签 excel vba acrobat-sdk

我正在将 pdf 导出到 excel,但有些我无法在我的 vba 代码中为 Acrobat.AcroPDDoc 创建对象

imported reference the below mentioned lib

我的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")。
你会在这个网站上找到很多很多的例子。
如果您拥有完整的 Adob​​e Acrobat 版本(不是仅限 Reader),一切都会正常工作

关于excel - 无法在 VBA 中创建 Acrobat.AcroPDDoc 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54925598/

相关文章:

excel - 如何将值插入非预先指定的数组大小?

jquery - 如何使用 VBA 单击基于 Java 的 Web 按钮?

excel - 每月第3个周三列表

shell - Excel VBA : Running a shell script to both change directory and then run a custom script

c++ - 如何调查部署机器上的 "Unable to create object the system cannot find the file specified"错误

c++ - Adobe Acrobat 插件 - 在上下文菜单中创建子菜单项

python - 如何使用 Python 仅将 Excel 单元格中字符串的一部分加粗?

vba - 将多个超链接添加到 PowerPoint 形状

excel - 更换、清理和修剪 VBA

javascript - 如何通过 Excel VBA 设置 Acrobat XI 打印机设置?