tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have this code to import data from a PDF to Excel Sheet.
The problem is it imports all the data as one column
is there something im missing ?
anyone know of a way to import from a pdf and have it look the same?
here my code
please help if you can
Thanks
Tony
I have this code to import data from a PDF to Excel Sheet.
The problem is it imports all the data as one column
is there something im missing ?
anyone know of a way to import from a pdf and have it look the same?
here my code
Code:
Sub PDFinport1()
Dim wsLog As Worksheet, wsOutp As Worksheet
Set wsOutp = Sheets("Test1")
Filename = "F:\MY Docs1\New1\Hotel Excel File Updates\test1.pdf"
ShellExecute 0, "Open", Filename, "", "", vbNormalNoFocus
Application.Wait (Now + TimeValue("0:00:02"))
SendKeys "^a", True
Application.Wait (Now + TimeValue("0:00:02"))
SendKeys "^c", True
Application.Wait (Now + TimeValue("0:00:02"))
wsOutp.Paste Cells(1, 1)
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "%{F4}", True
End Sub
please help if you can
Thanks
Tony