Public Sub ReadDetails(IsFilename As String)
' read the text from file

Set fso = CreateObject("Scripting.FileSystemObject")
Set tem = fso.OpenTextFile(IsFilename)



Do Until am = "end" Or am = "End" Or am = "END"

am = tem.readline

Loop

end Sub

This will read one line at a time, and in this spesific routine, it will stop when it hits the word "END" or "end" or "End". IsFilename = full path and filename.

hope this helps.