VBA to Read or Extract PDF Tables without Reader or Acrobat API - VBA PDF Automation-11

  Рет қаралды 31,860

VBA A2Z

VBA A2Z

Күн бұрын

Friendly tutorial to Automate PDF using real-world scenarios using VBA and PDF API.
More resources: vbaa2z.blogspot.com/2020/01/v...
Subscribe, Like, and Comment. 🙏Thanks for watching.
You can now support by buying any of the Projects or Source Code.
📥Downloads: pamaitech.com/downloads/
👍 Support: paypal.me/pamaitech
✉️ Contact: contact@pamaitech.com
📌What to watch next:
Playlist: kzfaq.infoplaylists
Videos: kzfaq.infovideos
#VbaA2z

Пікірлер: 130
@shinrafahell
@shinrafahell 4 жыл бұрын
Didn't know Word app could deal with pdf tables! Awesome tip, thanks!
@VBAA2Z
@VBAA2Z 4 жыл бұрын
You're welcome.
@holieh5301
@holieh5301 4 жыл бұрын
You’re the best! Thanks for another informative and useful video.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
You are so welcome!
@melivo853
@melivo853 4 жыл бұрын
Another excellent tutorial thank you!
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Glad you liked it!
@mikewashington4188
@mikewashington4188 2 жыл бұрын
You’re a miracle worker!!! Thanks brother
@VBAA2Z
@VBAA2Z 2 жыл бұрын
Glad to help
@azel2239
@azel2239 4 жыл бұрын
Thanks as always. Keep up the good work
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Thanks, will do!
@Rahul-sn1wn
@Rahul-sn1wn 4 жыл бұрын
Thanks sir for sharing your knowledge. Keep it up
@VBAA2Z
@VBAA2Z 4 жыл бұрын
It's my pleasure
@pedie131
@pedie131 4 жыл бұрын
love your tuts sir. keep it up. many thanks.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Glad you like them!
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Interested to become VBA Pro? Here is 100% free guided e-course with Real-life projects. Sign-up to participate, get assignments and a certificate:- bit.ly/3eX8tzl
@kingsoko5319
@kingsoko5319 Жыл бұрын
Thank you for sharing this powerful tip
@VBAA2Z
@VBAA2Z Жыл бұрын
You are so welcome
@Kamsy-qd6nt
@Kamsy-qd6nt 10 ай бұрын
Another's excellent one. Thanks.
@VBAA2Z
@VBAA2Z 10 ай бұрын
Thanks for listening
@aundysam8286
@aundysam8286 4 жыл бұрын
Another useful tut. thanks!
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Glad it was helpful!
@donaldreitsma6419
@donaldreitsma6419 Жыл бұрын
This was super helpful. There are up to 4 tables in a file I was going through and it was cumbersome using refresh all and getting errors because only 1 table is valid and I could not find a way to stop the error message (none of the VBA commands for error handling etc.. stopped the error message from appearing). Now with some modification I can find the right table and import the values.
@VBAA2Z
@VBAA2Z Жыл бұрын
Glad it helped!
@bnancy3699
@bnancy3699 4 жыл бұрын
this is brilliant. thank you.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
You're very welcome!
@lechstryzewski9350
@lechstryzewski9350 Жыл бұрын
Awesome video and outstanding tutorial. I am running into a problem though. When using the doc.table method (tRow and tCount) ..... it works, but it stops counting at the first row (and after the 4th column). When I Debug.Print tRow & tCount it returns 2 and 5 respectively - That count is correct. However, when I "send" it to the Worksheet, I only get 1Row and 4 Columns. Please note, the first column is actually blank or "empty". I thought that might have something to do with it. - Now, when I use the Paragraph method and Debug.Print wLine ...... ALL of the information, text, etc.. comes back to the Immediate Window PERFECTLY (minus Trim and Clean). The problem with this is, ...... I cannot get it to "paste" that data to the Spreadsheet. Cell "A1" is continually blank. I am stuck. - Any suggestions?
@wikamdiopekiang4972
@wikamdiopekiang4972 2 жыл бұрын
thank you so much for this helpful tutorial
@VBAA2Z
@VBAA2Z 2 жыл бұрын
You're very welcome!
@hoseal8048
@hoseal8048 4 жыл бұрын
Thanks. Very informative
@VBAA2Z
@VBAA2Z 4 жыл бұрын
You're welcome
@Brad-fh2vn
@Brad-fh2vn Жыл бұрын
another great video thanks so much!
@VBAA2Z
@VBAA2Z Жыл бұрын
Glad you enjoyed it!
@WeningWang
@WeningWang Жыл бұрын
thanks for useful video.
@VBAA2Z
@VBAA2Z Жыл бұрын
You are most welcome
@Lalsuiliu-ek2so
@Lalsuiliu-ek2so 11 ай бұрын
million thanks to you Sir
@VBAA2Z
@VBAA2Z 11 ай бұрын
you're most welcome!
@Shahil-li4hj
@Shahil-li4hj Жыл бұрын
Amazing Sir
@VBAA2Z
@VBAA2Z Жыл бұрын
thanks
@user-sy6ir9bo5j
@user-sy6ir9bo5j 10 ай бұрын
Thanks a lot man U are a god
@VBAA2Z
@VBAA2Z 10 ай бұрын
Glad to hear it help but I am not :)
@wingsoftechnology5302
@wingsoftechnology5302 3 жыл бұрын
Thanks bro.... I really didn't know about this before 👍🏽
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Most welcome. Thanks for watching
@wingsoftechnology5302
@wingsoftechnology5302 3 жыл бұрын
@@VBAA2Z Bro can you please tell, How can I print an Excel file using vba & selecting no. of copies using vba only ?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
try something like this. Sheet1.PrintOut Copies:=10
@ashwaniaggarwal4218
@ashwaniaggarwal4218 4 жыл бұрын
Many thanks to make this video. Please make the video on msi installer for VSTO deployment project. I am waiting for next video of your VSTO Series.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Sure, we've many topics to be covered in Office for .NET :)
@kylegurtowski5012
@kylegurtowski5012 4 жыл бұрын
By the way, an easier way to get a filepath than copying the file name and adding it to the folder in Windows Explorer, you can use Shift+Left Click on the file you want then choose "Copy As Path".
@VBAA2Z
@VBAA2Z 4 жыл бұрын
thanks for the useful tip Kyle.
@gutembergmaciel
@gutembergmaciel 2 жыл бұрын
Supperb
@VBAA2Z
@VBAA2Z 2 жыл бұрын
Thank you! Cheers!
@akshayc6163
@akshayc6163 3 жыл бұрын
When i run the code at 6:07, it keeps running but doesn't display anything to the Immediate window. Why?
@Shriny100
@Shriny100 2 жыл бұрын
It just doesn't work for me. Not sure why. The code run hangs for infinite time at this last line Set wDoc = wApp.Documents.Open(FolderPath & pdffile, False) FolderPath = Application.ThisWorkbook.Path & "\" FileExtn = "*.pdf*" pdffile = Dir(FolderPath & "\" & FileExtn) ExcelFile = Dir(FolderPath & "\" & "*.xls*") wApp.Visible = False '''Loop through each pdf file in folder Do While pdffile "" On Error Resume Next Set wDoc = wApp.Documents.Open(FolderPath & pdffile, False)
@levelupexcelskill
@levelupexcelskill 4 жыл бұрын
Many thanks to make this video....Could you please make a video of advance array, VBA dictionary and collection so we can develop our advance knowledge in VBA
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Please check this video. I have used practical example with simple example to use array and dictionary. btw - array and dictionary are very simple to use in VBA. kzfaq.info/get/bejne/fbypnrWd3czegH0.html
@levelupexcelskill
@levelupexcelskill 4 жыл бұрын
@@VBAA2Z thank you so much......you have made a video to comparing sheet could you please elaborate that because I am new in vba array dictionary and collection
@issergiothe
@issergiothe 3 жыл бұрын
é isso que estava procurando, seria bom em Português
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Obrigada. Vou tentar atualizar as legendas
@KhalilYasser
@KhalilYasser 4 жыл бұрын
Thanks a lot for the awesome video. It seems you forgot the link in the description :)
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Sure will upload it to blog soon.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Please check vbaa2z.blogspot.com/
@antoniomello1620
@antoniomello1620 3 жыл бұрын
When I run this code the line "Set wDoc = wApp.Documents.Open(filename, False)" fails and Excel prompts an error saying that the Open method couldn't work. What can this be? (I already have the MS objects libraries checked in Tools > References).
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Hi Antonio, what is the exact error? it is possible your file path is not correct.
@abbegaetan7328
@abbegaetan7328 4 жыл бұрын
Thank you for all your usefull videos. Please i need help to download multiple files form SharePoint subfolders that could be exist early or not.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
here is example of how to upload. to download you just need to reverse the source and destination path. kzfaq.info/get/bejne/grKogJqUytG4n4k.html
@abbegaetan7328
@abbegaetan7328 4 жыл бұрын
@@VBAA2Z That right. Thank you. I am going to try it and after i will come back to you.
@jimhenderson1005
@jimhenderson1005 Жыл бұрын
Very useful and informative. However, I believe your video would be much better if you would write the code in advance so that you could show and explain the code. Watching you type, correct typos, handle errors, etc. is very boring and makes the video excessively long.
@VBAA2Z
@VBAA2Z Жыл бұрын
thanks Jim! much appreciated for feedback
@jeffreyvanriebec9837
@jeffreyvanriebec9837 3 жыл бұрын
Great tutorial @VBA A2Z Does this only work on some type of PDF's? Because I am getting only abracadabra back when I try to extract data. Also I cannot find any usable field when I look inside PDF's with notepad etc I can read inside the PDF files => "PDF 1.4" Any suggestions?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Correct, it does not work for all types of PDF. Some pdf created using Acrobat are not readable using Word App lib leaving us with Acrobat API which is cost involved but most reliable.
@anhnhatnguyet4628
@anhnhatnguyet4628 3 жыл бұрын
Excel file has many sheets with different data structures, I need to output a PDF file containing the data of all the sheets so that when printing, choose 2-sided printing mode. Can VBA do this?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Sure it can it done. I'll try and cover this topic in future videos
@avinashsudulagunta9470
@avinashsudulagunta9470 3 жыл бұрын
Hi Sir, I have same kind of requirement but I need to copy entire data from pdf to excel and I don't have any other applications except ms office. While using thus code I am getting notification as "Microsoft excel is waiting for another application to complete an OLE acttion" Don't know what to do.
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Hi Avinash - please check out this thread techcommunity.microsoft.com/t5/excel/microsoft-excel-is-waiting-for-another-application-to-complete/m-p/1388914
@Ian_Enterprise
@Ian_Enterprise 2 жыл бұрын
Cool, is there also a way to get the images? from pdf of even word to save in a folder
@VBAA2Z
@VBAA2Z 2 жыл бұрын
I haven't tried. Try posting it to stackoverflow.com/
@binumathew721
@binumathew721 Жыл бұрын
Hi. Thank you for the wonderful code. But why I am getting an error with Disable Macro in Word
@VBAA2Z
@VBAA2Z Жыл бұрын
Happy to help. please check support.microsoft.com/en-us/office/enable-or-disable-macros-in-microsoft-365-files-12b036fd-d140-4e74-b45e-16fed1a7e5c6
@simonnartpok6802
@simonnartpok6802 4 жыл бұрын
is it possible to attached signature to pdf file with api / any other method using VBA?
@VBAA2Z
@VBAA2Z 4 жыл бұрын
I'll try and demo in coming videos for now here is API ref. www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/access_v9.pdf
@komputerkerja7391
@komputerkerja7391 3 жыл бұрын
Can u help me? How to extract some image from word document to folder using excel vba?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
try below and also check this video: kzfaq.info/get/bejne/q8mTl7KI2siwoJs.html Set obj = ActiveDocument.InlineShapes(1) obj.OLEFormat.Activate obj.OLEFormat.Object.SaveAs "filename"
@kamalam29
@kamalam29 3 жыл бұрын
Hi Lung, One question! This is clearly means, Word Library has the facility to convert pdf files. We can open pdf files in work and then we can extract a piece of information. But could you guide us, is this facility also works with Office 2003, 2007, 2010, 2013, 2016, 365 or word 2003, 2007, 2010, 2013, 2016, 365 as well?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Yes it should. Though I have not tried in all the versions.
@kamalam29
@kamalam29 3 жыл бұрын
@@VBAA2Z I did some research. OCR is available from version 2013. Thanks a lot Lung.
@VBAA2Z
@VBAA2Z 3 жыл бұрын
@@kamalam29 great, thanks Kamal
@tobiewaldeck7105
@tobiewaldeck7105 3 жыл бұрын
Hello, LP! The application works occasionally but with a lot of pdfs I'm getting this notification: "Microsoft Excel is waiting for another application to complete an OLE action" How do I overcome this? Does it have something to do with the fact that PDFXchange editor is my default pdf.
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Hi Tobie, this could be due to multiple scenarios like memory not cleared properly, the library locked by other app. Try below settings and see if it helps. techcommunity.microsoft.com/t5/excel/no-links-vba-addons-but-microsoft-excel-waiting-for-another/m-p/331063 While the error message is always the same, there are actually a couple of pretty common scenarios that trigger this particular error in Microsoft Excel: DDE protocol is deactivated in Excel - This problem can occur because the DDE protocol (Dynamic Data Exchange) is deactivated in the Excel settings. Corrupt Office Installation - Some users have reported that the problem was resolved after reinstalling or repairing the entire Office installation. Adobe Acrobat PDFMaker add-in conflicts with Excel - There have been some reports from users who were able to fix the problem by disabling or uninstalling the PDFMaker plug-in. IE (Internet Explorer) process is interfering with the DDE - this usually occurs when the user tries to save a file in Microsoft Excel. In this case, the solution is to manually end the process. Examble for DDE protocol, a quick guide. Open Microsoft Excel and click on File. It doesn't matter whether you're opening a new workbook or a new document. Open Microsoft Excel and go to File On the File menu in the left pane, click Options. Go to File> Options From the Excel Options menu in the left menu, click the Advanced tab. Then move to the right pane and scroll down until you get to the General section. Make sure that the Ignore other applications using Dynamic Data Exchange (DDE) check box is cleared. Examble for Adobe Acrobat : In the COM Add-Ins box, either clear the check box for the Acrobat PDFMaker Office COM Add-in, or select it and click Remove to delete it completely. Examble for IE explorer: Press Ctrl + Shift + Esc to open Task Manager. Switch to the Processes tab in Task Manager and check whether an Internet Explorer process is currently active. If one is open, just right click on it and choose End Task to close it. End the Internet Explorer (IE) process Return to Excel and see if the "Microsoft is waiting for another application to complete an OLE action" error still occurs when you try to save the file. Wenn das alles nicht geholfen hat , dann hilft nur (maybe) die Unterdrückung von Excel Application Messaging mit VBA or turn off compatibility mode .
@tobiewaldeck7105
@tobiewaldeck7105 3 жыл бұрын
@@VBAA2Z I will explore more as some did not work but it may be that the pdf is in some sort of Acrobat Format or to big. I would also like to know how to change the code to get the heading or description just above a table if that is possible.
@VBAA2Z
@VBAA2Z 3 жыл бұрын
sure, happy to assist. feel free to send me your code to the email in video description.
@oleksijm
@oleksijm 2 жыл бұрын
Where do you get the dark theme for the VBA code editor? Thanks
@oleksijm
@oleksijm 2 жыл бұрын
Nevermind, found your other video where you explain it.
@VBAA2Z
@VBAA2Z 2 жыл бұрын
ok great! hope it helps
@joseluis7118
@joseluis7118 Жыл бұрын
I use excel 2007 at work. Do you think this could work?
@VBAA2Z
@VBAA2Z Жыл бұрын
Yes, it should.
@sajuts5635
@sajuts5635 4 жыл бұрын
Hi my vba code not identifying some tables...because it is mergerd in 2 or 3 pages and its only givin the table data from last page only not all data. plz help
@VBAA2Z
@VBAA2Z 4 жыл бұрын
In that case I guess you can extract all data to excel first and organize your table back. All the best! 3. Read all PDF Content using VBA kzfaq.info/get/bejne/q8lmo8SdrJ2aiWw.html 4. Extract table from PDF using VBA kzfaq.info/get/bejne/q8lmo8SdrJ2aiWw.html
@sajuts5635
@sajuts5635 4 жыл бұрын
@@VBAA2Z Thank you.. but i want to do the same without using Acrobat , am asking about making any changes in this code (code in this video) will help me????
@giancajaracadillo
@giancajaracadillo 4 жыл бұрын
Los códigos solo son compatibles con Office 365? O que?
@VBAA2Z
@VBAA2Z 4 жыл бұрын
También debería funcionar en versiones anteriores de Office.
@giancajaracadillo
@giancajaracadillo 4 жыл бұрын
@@VBAA2Z la vez pasada estaba haciendo el logo en un video tuyo, pegué el código y no funcionó...
@giancajaracadillo
@giancajaracadillo 4 жыл бұрын
sale como que: el codigo debe actualizarse para usarse en sistemas de 64 bits
@VBAA2Z
@VBAA2Z 4 жыл бұрын
@@giancajaracadillo Por favor revise este enlace. Tenga en cuenta que algunos controles de formulario, como ListView, no funcionan para Excel de 64 bits. vbaa2z.blogspot.com/2020/04/compile-error-code-in-this-project-must.html
@vg6119
@vg6119 3 жыл бұрын
Hi can you share the vba program and I have pdf exchange will it work on it?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
This program can work without PDF Reader / Acrobat.
@vg6119
@vg6119 3 жыл бұрын
Thank you, do you have a copy of the program so that I can try it out
@vg6119
@vg6119 3 жыл бұрын
Also is there a way we can run a vba in excel and have a text or sentence inserted in pdf?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
@@vg6119 yes, from any office application like excel, word etc. you'll need PDF Acrobat for that but if this is the pdf you're creating you can easily convert excel / word doc to pdf check this video. kzfaq.info/get/bejne/rJOlq9OUnZzboqs.html
@SujithSurendran123
@SujithSurendran123 4 жыл бұрын
This was a grt tip thank you so much for this, is it possible for you to provide the code ?
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Sure will upload it to blog soon.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
Please check vbaa2z.blogspot.com/
@SujithSurendran123
@SujithSurendran123 4 жыл бұрын
@@VBAA2Z Thank you soo much..!! You are awesome !!
@ilanbam
@ilanbam 3 жыл бұрын
hi friend, your video helped me a lot, but I have one little problem, I can't copy the header of the page, can you help me?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
It is possible the header is snapshot and not text
@ilanbam
@ilanbam 3 жыл бұрын
@@VBAA2Z can you show me please how to write the code?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
if snapshot we can't read data
@jalalkasmani2575
@jalalkasmani2575 3 жыл бұрын
I am trying to convert the pdf to word doc but the format does not remain same and some text goes to some other page of the word doc. Can you please help advise ?
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Have you tried this? kzfaq.info/get/bejne/q8lmo8SdrJ2aiWw.html
@jalalkasmani2575
@jalalkasmani2575 3 жыл бұрын
@@VBAA2Z I cannot see the reference used in video at my office laptop Excel.
@VBAA2Z
@VBAA2Z 3 жыл бұрын
This version uses Acrobat API, I'd recommend checking it from beginning.
@jalalkasmani2575
@jalalkasmani2575 3 жыл бұрын
@@VBAA2Z you are saying in the below video Acrobat API is used kzfaq.info/get/bejne/q8lmo8SdrJ2aiWw.html
@VBAA2Z
@VBAA2Z 3 жыл бұрын
Yes, mostly.
@SantiagoMacias-jw6vk
@SantiagoMacias-jw6vk Ай бұрын
word is converting everything in my pdf into an image, hel please
@VBAA2Z
@VBAA2Z Ай бұрын
snapshot doc cannot be read
@prathameshsutar3090
@prathameshsutar3090 4 жыл бұрын
Can you please send file link?
@VBAA2Z
@VBAA2Z 4 жыл бұрын
vbaa2z.blogspot.com/
@fatehsinghshekhawat9674
@fatehsinghshekhawat9674 3 жыл бұрын
Compile error user defined type not defined
@VBAA2Z
@VBAA2Z 3 жыл бұрын
May I know which line is causing this error?
@noahcastle9682
@noahcastle9682 2 жыл бұрын
You may have already figured it out. This happened to me when I typed wline.range.text in the for each loop Instead of wline = pg.range.text By mistake
@KhalilYasser
@KhalilYasser 4 жыл бұрын
Still waiting for the link my friend.
@VBAA2Z
@VBAA2Z 4 жыл бұрын
vbaa2z.blogspot.com/
Use Excel VBA to Read API Data
20:48
Excel Macro Mastery
Рет қаралды 133 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 12 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 122 МЛН
PDF to Excel Converter in Excel VBA
8:18
PK: An Excel Expert
Рет қаралды 112 М.
Create multiple PDFs based on a list in Excel | Excel Off The Grid
13:02
Excel Off The Grid
Рет қаралды 32 М.
VBA to BROWSE & COPY Data from SELECTED File in Excel
10:00
Leila Gharani
Рет қаралды 323 М.
How to Extract Tables from PDF using Python
14:07
Misha Sv
Рет қаралды 62 М.
Watch these 28 minutes if you want to become an Advanced VBA user...
29:01
Excel Macro Mastery
Рет қаралды 50 М.
You won't BELIEVE what I just did with TanStack's React Tables!
35:58
PDF to Word Converter Macro in Excel VBA
13:51
PK: An Excel Expert
Рет қаралды 20 М.
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 5 МЛН
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 491 М.
Cheapest gaming phone? 🤭 #miniphone #smartphone #iphone #fy
0:19
Pockify™
Рет қаралды 4,1 МЛН