【发布时间】:2021-04-16 17:05:04
【问题描述】:
您好,我有一个 pdf 文件(路径),我想将其转换为 excel 文件。我用的是福昕魅影。我已经将 api 手册用于参考,但我无法弄清楚。 (http://cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/API%20Reference%20for%20Application%20Communication.pdf) 该文件只是一个带有随机值的 pdf。我有图书馆 PhantomPDF
Sub convert()
Dim phApp As PhantomPDF.Application
Set phApp = CreateObject("PhantomPDF.Application")
Dim phCreator As PhantomPDF.Document
Set phCreator = phApp.CurrentDocument
Dim hresult As Variant
Dim path As String
path = "C:\Users\plfournier\Documents\test.pdf"
hresult = phCreator.OCRAndExportToExcel(path, 1, 1, True)
End Sub
【问题讨论】:
-
运行这个会发生什么?
-
它无法识别函数 OCRAndExportToExcel
-
这里的
phApp.CurrentDocument是什么?您似乎没有打开任何文档。命令OCRAndExportToExcells 应该在已经打开的文档上运行。path应该是您要放置在此过程中创建的 Excel 文件的路径。 cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/…