Hello All,
I am trying to loop through files in a folder and searching through the words. I have the searching words and finding what I need there. What I am having trouble with is my code is only finding one file. I appreciate any help. Maybe I putting something out of order...?
Thank you,
Dannie
I am trying to loop through files in a folder and searching through the words. I have the searching words and finding what I need there. What I am having trouble with is my code is only finding one file. I appreciate any help. Maybe I putting something out of order...?
Thank you,
Dannie
Code:
folder = "T:\USER\emt\PPA Amend\1" myfile = Dir(folder & "\" & "*" & ".pdf")
For Each cell In Sheets(1).Range("K2:K" & LR)
Do While myfile <> ""
Set pddoc = CreateObject("AcroExch.PDDoc")
If pddoc.Open(folder & "\" & myfile) Then
Set jso = pddoc.getjsobject
inum = pddoc.getnumpages
If Not jso Is Nothing Then
Count = jso.getpagenumwords(0)
For i = 18 To 18
word = jso.getpagenthword(0, i)
If LCase(word) Like (LCase(Email) & "*") Then
MsgBox word
End If
Next
End If
End If
Loop
Next