I am trying to download some bank statements which only come in .pdf format and convert them to an excel file. I use NitroPDF.exe to convert the .pdf file to an excel file and then have created a VBA script to clean it up and append it into my main Excel file. I have to do the conversion manually up to the point where Excel VBA takes over. I would like to automate it, not sure how. I have tried to use cmd line:
"C:\Program Files\Nitro\Pro\12\NitroPDF.exe" "C:\Users\Adam\OneDrive\Desktop\TEMP\WebBroker - Balances.pdf
And that works fine in that it opens NitroPDF with the file I need in it. however when I try to run it in a .vbs file (named: RunningPdf.vbs) like this:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "C:\Program Files\Nitro\Pro\12\NitroPDF.exe" "C:\Users\Adam\OneDrive\Desktop\TEMP\WebBroker - Balances.pdf", 1, true
I get an error:
Script: C:\Users\Adam\OneDrive\Desktop\TEMP\RunningPdf.vbs
Line: 2
Char: 59
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error
What am I doing wrong in my translation from cmd to vbs? Should I even be using vbs for this? how could I meld this code to my Excel VBA code? I was planning to use sedkeys in the vbs code once NitroPDF opened, to automate the conversion from pdf to Excel, is this the best way? Sorry for the lengthy post, any help would be greatly appreciated Thank you