Hi,
Im trying to copy text from a PDF File to an excel workbook, I have managed to open the PDF File with a userform the user selects the file to open using Application.GetOpenFilename then I use a Function I found to open the PDF file, so far so good, but then when I try to use sendkeys to select all and copy it doesnt work, this file ( Macro ) is going to be used on several computers on several places so I dont know the path of the program used to open the PDF File, any ideas on how to select and copy the text from the PDF File ? Thanks in advance !
Code
Public Bitacora
Dim Bitacora2 As String
Sub Bitacora_a_Excel()
Application.ScreenUpdating = False
UserForm1.Show
Bitacora2 = Bitacora
Call OpenAnyFile(Bitacora2)
Application.Wait (Now + TimeValue("0:00:10"))
SendKeys ("^a")
SendKeys ("^c")
This if the code in the user form
Code
Private Sub CommandButton1_Click()
Bitacora = Application.GetOpenFilename(Title:="Elegir Archivo", filefilter:="PDF files (*.pdf), *.pdf")
FileNum = FreeFile()
If Bitacora = "" Then
Exit Sub
End If
CommandButton2.Visible = True
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Display More