Dear All
I want to copy some value from a pdf file and to paste it in a particular excel file. I am using following code but not able to do the desired.
Sub Shell_Copy_Paste()
Dim o As Variant
Dim wkSheet As Worksheet
Set wkSheet = ActiveSheet
o = Shell("C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe C:\Users\Victor Lan\Documents\sample.pdf", vbNormalFocus)
Application.Wait (Now + TimeSerial(0, 0, 2)) 'Wait for Acrobat to load
SendKeys "^a" 'Select All
SendKeys "^c" 'Copy
SendKeys "%{F4}" 'Close shell application
wkSheet.Range("B5").Select
SendKeys "^v" 'Paste
End Sub
I have got the above code from a website. The macro runs but the problem is that it does not paste anything in excel.
Thanks in advance
Brijesh
I want to copy some value from a pdf file and to paste it in a particular excel file. I am using following code but not able to do the desired.
Sub Shell_Copy_Paste()
Dim o As Variant
Dim wkSheet As Worksheet
Set wkSheet = ActiveSheet
o = Shell("C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe C:\Users\Victor Lan\Documents\sample.pdf", vbNormalFocus)
Application.Wait (Now + TimeSerial(0, 0, 2)) 'Wait for Acrobat to load
SendKeys "^a" 'Select All
SendKeys "^c" 'Copy
SendKeys "%{F4}" 'Close shell application
wkSheet.Range("B5").Select
SendKeys "^v" 'Paste
End Sub
I have got the above code from a website. The macro runs but the problem is that it does not paste anything in excel.
Thanks in advance
Brijesh