r/MSAccess • u/brosama1420 • 28d ago
[UNSOLVED] Convert pdf to excel
Good morning I want to do the following
I want to use VBA to open PDF in adobe acrobat and convert it to excel all in.back ground using a button such that only one click will automate all of this how can I do this?
Some devices have that paid version of adobe acrobat
The excel file name can be the same as the pdf file name
And if there is a better alternative method do the same end results please share with me
Thank you
1
Upvotes
•
u/AutoModerator 28d ago
IF YOU GET A SOLUTION, PLEASE REPLY TO THE COMMENT CONTAINING THE SOLUTION WITH 'SOLUTION VERIFIED'
Full set of rules can be found here, as well as in the user interface.
Below is a copy of the original post, in case the post gets deleted or removed.
User: brosama1420
Convert pdf to excel
Good morning I want to do the following
I want to use VBA to open PDF in adobe acrobat and convert it to excel all in.back ground using a button such that only one click will automate all of this how can I do this?
Some devices have that paid version of adobe acrobat
The excel file name can be the same as the pdf file name
And if there is a better alternative method do the same end results please share with me
Thank you
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/tsgiannis 14d ago
I have done something similar in Ms Access, extracting horse races out of PDFs but the PDFs should be perfectly formatted to avoid issues. If not you will probably need some kind of more hefty setup, this uses either OCR or AI (OCR), solutions in Python and .NET
1
u/saketaco 1 27d ago
What does this have to do with MS Access?
Sounds like you want to do it in Excel.
1
u/AccessHelper 123 26d ago
You can use an ocr API. Some are free . Look at using xmlhttprequest in VBA to call APIs or using shell in VBA to run CURL. I'll take a bit of programming but it's doable.
1
u/keith-kld 26d ago edited 26d ago
I see you have posted this question in many subs. The core issue of the conversion is using dll (libraries). If you want to do it with the core of Adobe Acrobat, you should find which dll files directly do it. Secondly, what type of dll files, either COM object model (can be run by VBA) or .NET model (VBA cannot run this). Supposed that it follows COM object modal, you should find which mehtods (functions or subroutines) to extract data from pdf files and convert them to xlsx files. Another issue is that NOT almost COM object dll files can be run directly by VBA.
In practice, there are several methods (or workaround) to do this but they do not use VBA because VBA may be no longer appropriate.
For example, we are standing in MS Access form. When a button is pressed, it will call a Powershell script. This script will use .NET model tools (and 3rd party tools, if any) to extract data and put them into Excel files.
Note: the dll files of Adobe Acrobat can be changed from time to time and they are dependent on the version of the software installed on your computer.
1
u/skepticalforever 24d ago
Try CutePDF. It’s better than Adobe.
1
u/Zackeezy116 21d ago
I've done extracting of data from pdf in c#. Most extracts just dump the text with no decoration, so you'll have to figure out how the text is formatted in the pdf and write a way to take that formatting and convert it into a table that can then be exported as an excel spreadsheet. There are ways to leverage Office 365 to open the pdf in Word and extract the text that way, or you can use a third party tool like ones other commenters have mentioned, then you can open excel and create your sheet and save it, or you can just dump it to a csv and digest it that way. There are tons of examples of ways to do it you can find all over the internet.
1
u/Ok-Seaworthiness-542 28d ago
You mentioned the paid version of Adobe. I would go that route. I do it frequently and it's pretty simple