This code loops through all PDF's in a folder, copies the individual PDF, closes it, and then it's supposed to manipulate this data (this part has not been written yet) and then do the same to the next PDF and so on
- Again my problem is that i cant determine which column the data is coming from..
Copying using ctrl+a, control+c, control v (or SendKeys ("^a"), SendKeys ("^c"), SendKeys "%{F4}", True
This way of doing it removes the format from the pdf when pasting into excel...
Sub Sheet2_Button1_Click()
Dim strPath As String
Dim MyFile As String
Dim Adobefile
Dim sep As String: sep = Application.PathSeparator
Dim shTemp As Worksheet: Set shTemp = Worksheets("Temp")
Dim shMain As Worksheet: Set shMain = Worksheets("Main")
Dim i As Integer
Dim iLastRow As Integer
Dim sTemp As String
Dim CreatedDate
strPath = "C:\Users\jkb\Desktop\PDF"
MyFile = Dir(strPath & sep & "*.pdf")
Do While MyFile <> ""
ActiveWorkbook.FollowHyperlink strPath & sep & MyFile
SendKeys ("^a")
SendKeys ("^c")
Application.Wait (Now + TimeValue("00:00:02"))
SendKeys "%{F4}", True
AppActivate "Microsoft Excel"
shTemp.Activate
ActiveSheet.Range("A1").PasteSpecial
'------------------------------------------------------------------------------------------------------------------
'Handling data
' Planning to manipulate the data in this section, but havent written code yet, since this part is not important if i cant specify which of the two columns the data came from :)
'Next file
NextFile:
MyFile = Dir()
Loop
End Sub