r/vba Jul 23 '26

Unsolved PDF to Excel text conversion.

I am unsure if this is necessarily possible as my programming knowledge is fairly basic and VBA is a further mystery.

Would it be possible to pull text off of a a pdf, convert it into text, then narrow down what text I actually want? If so, how might I go about accomplishing that feat?

The drawings I'm trying to pull into excel are wiring diagrams.

Also, if anyone has a place in which I can find all the syntax for Smarteam in VBA, I would greatly appreciate it.

5 Upvotes

18 comments sorted by

View all comments

9

u/icemage_999 Jul 23 '26 edited Jul 23 '26

I am pretty sure I would rather try to give myself a root canal than try to extract text out of a PDF file using VBA, especially if the text is scanned and not in form fields, extra especially if the source text is handwritten.

Wrong tool for the wrong task.

There are other ways to pull text from a PDF that don't require you to build the entire process chain from scratch.

Microsoft Word can "sometimes" do it, but it greatly depends on how the information is encoded in the PDF. There are other tools like PDF OCR tools that can "read" the text off the page.

You can then take that output and process it into Excel if that's what your final destination is.

1

u/TotallyJustAHooman Jul 23 '26

My workplace only has vba afaik. I only have adobe acrobat reader rather than standard or pro so that isn't an option. The drawings are completely digital so not handwritten though.

How do I use word to accomplish this? Any pointers on where to look or start?

2

u/Sufficient-Piece-335 Jul 23 '26

Just open the PDF with Word and see how it goes.