New Member
May 28, 2022
Hello all,
I’ve been recently trying to learn how to get VBA to read contents of files for me. I successfully have gotten how to read a text file, but am unable to continue that to PDF or word documents. This is because when I define apps as CAcroApp or CAcroAVDoc, the code does not recognize it though I have the reference tab checked off for the Adobe library. Has anyone got experience using VBA to read pdf’s for them and return the cost of a certain part for example? Or any form of value from a pdf doc? Thank you
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Gray,
If you want to define objects as CAcroApp or CAcroAVDoc, you need a reference to the Acrobat library. If you don't have a reference to that lib, you have to create the object in late binding:
set obj=CreateObject("CAcroApp")
Word documents and pdf documents can vary a lot, it's hard to build something reliable that works with all possible variations.
Try extracting data with Power Query from pdf files.
New Member
May 28, 2022
Hello all,
I’ve been recently trying to learn how to get VBA to read contents of files for me. I successfully have gotten how to read a text file, but am unable to continue that to PDF or word documents. This is because when I define apps as CAcroApp or CAcroAVDoc, the code does not recognize it though I have the reference tab checked off for the Adobe library. Has anyone got experience using VBA to read pdf’s for them and return the cost of a certain part for example? Or any form of value from a pdf doc? Thank you
I got this,...
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Nothing attached, we cannot see what you got.
How do you "define apps"?
Dim AcrobatApplication As New Acrobat.CAcroApp
Dim AcrobatDocument As New Acrobat.CAcroAVDoc
The declarations above are using EARLY binding and need a reference to Adobe library (Adobe ACROBAT library)
The ones below are using LATE binding, they don't need a reference to the library, but the library must exist:
Dim AcrobatApplication As Object
Dim AcrobatDocument As Object
Set AcrobatApplication = CreateObject("AcroExch.App")
Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
Adobe ACROBAT must be installed, does not work with Adobe Reader.
Try macropod's sample codes:
1 Guest(s)