The easiest way to look for stuff like this is to use a regular expression.
The following link is useful for the use of a scripting regular expression object
Regular Expression Object and this one descibes the possible regular expressions themselves
Regular Expressions .
Here is a code segment I used in a similar situation. Once the input file has been split into pages you should be able to fit the whole of each file into a Vb string variable (64k max). This means it can be read in one go which avoids a lot of messy code.
strFileName=Watch.GetJobFileName()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName,1)
strContents = objFile.ReadAll
objFile.Close
Set regEx = New RegExp ' Create regular expression.
regEx.Pattern = "file #: \d{6}-\d" ' Set pattern.
regEx.IgnoreCase = False ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
set matches = regEx.Execute(strContents) ' Execute search.
If Matches.count = 0 Then
'no match
Watch.SetJobInfo 1,"NO MATCH"
Else
Watch.SetJobInfo 1,right(Matches(0).Value,8)
End if
Hope this helps
Stuart