Hi,
Am an struggling with the following problem. I need to copy pdf sales invoices to Excel 2016, into 1 Sheet, one under the other i.e. all in 1 column. As the amount of documents is big doing it manually is totally counterproductive. I tried to find a suitable piece of VBA Code to do this but only managed to open 1 File and copy it to Excel. the Code below:
Sub Start_Adobe()
Dim AdobeApp As String
Dim AdobeFile As String
Dim StartAdobe
AdobeApp = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"
AdobeFile = "C:\Users\prmk3\Documents\01 PM\01 DE\04 RTR\TUGU_5043121_1.pdf"
StartAdobe = Shell("" & AdobeApp & " " & AdobeFile & "", 1)
Application.OnTime Now + TimeValue("00:00:01"), "FirstStep"
End Sub
Private Sub FirstStep()
SendKeys ("^a")
SendKeys ("^c")
Application.OnTime Now + TimeValue("00:00:01"), "SecondStep"
End Sub
Private Sub SecondStep()
AppActivate "TEST GS 20171108v1556.xlsm - Excel"
Sheets("GS").Activate
Range("A2").Activate
SendKeys ("^v")
End Sub
Now I need to make the code Loop through the files but this is something which is beyond my VBA abilities. I would also like the whole Code to be in 1 Procedure so without the Private Subs. Please HELP as otherwise I'll have to become the worlds fastest Ctrl C + Ctrl V typer...
Am an struggling with the following problem. I need to copy pdf sales invoices to Excel 2016, into 1 Sheet, one under the other i.e. all in 1 column. As the amount of documents is big doing it manually is totally counterproductive. I tried to find a suitable piece of VBA Code to do this but only managed to open 1 File and copy it to Excel. the Code below:
Sub Start_Adobe()
Dim AdobeApp As String
Dim AdobeFile As String
Dim StartAdobe
AdobeApp = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"
AdobeFile = "C:\Users\prmk3\Documents\01 PM\01 DE\04 RTR\TUGU_5043121_1.pdf"
StartAdobe = Shell("" & AdobeApp & " " & AdobeFile & "", 1)
Application.OnTime Now + TimeValue("00:00:01"), "FirstStep"
End Sub
Private Sub FirstStep()
SendKeys ("^a")
SendKeys ("^c")
Application.OnTime Now + TimeValue("00:00:01"), "SecondStep"
End Sub
Private Sub SecondStep()
AppActivate "TEST GS 20171108v1556.xlsm - Excel"
Sheets("GS").Activate
Range("A2").Activate
SendKeys ("^v")
End Sub
Now I need to make the code Loop through the files but this is something which is beyond my VBA abilities. I would also like the whole Code to be in 1 Procedure so without the Private Subs. Please HELP as otherwise I'll have to become the worlds fastest Ctrl C + Ctrl V typer...