Hello,

1. I've got code where i'm using Excel to open a PDF file. It then selects, copies and pastes the data in to my Excel workbook. I just discovered some of but not all of the pdf files have more than one page. My current script is only picking up the first page of the pdf file. Is there anyway for me to select all pages and perform the same function?

2. The initial line of my code identifies the adobe file to open. the filename will be changing each month based on the date in the filename. Is there a way to account for this using a wildcard, etc for the filename i'm opening?

I'm still fairly new to vb and any assistance would be greatly appreciated. Thank you all in advance for your time and assistance.

Scott

Sub StartAdobe()

Dim AdobeApp As String
Dim AdobeFile As String
Dim StartAdobe As Long

AdobeApp = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"
AdobeFile = "X:\ProgramActivity_HealthPlans_PeachState2014_Oct2014.pdf"

StartAdobe = Shell("" & AdobeApp & " " & AdobeFile & "", 1)

Application.OnTime Now + TimeValue("00:00:05"), "FirstStep"

End Sub

Private Sub FirstStep()

SendKeys ("^a")
SendKeys ("^c")

Application.OnTime Now + TimeValue("00:00:10"), "SecondStep"

End Sub

Private Sub SecondStep()

AppActivate "Microsoft Excel"

Range("A1").Activate

SendKeys ("^v")

End Sub