I'm working on a plug in that compares a text file to contents of a Sentence table in Hals brain. 
What I have doesn't seem to do the job correctly. It indeed works, however, I notice the program picking up contents that already exist. I was wondering if anyone has a more effective method they've used in the past.  
'Open the text file
         Set objFile = objFSO.OpenTextFile("text file location", ReadVariable())
         Do Until objFile.AtEndOfStream
                TextCheck = objFile.Readline
         Loop
         objFile.Close   
         
'Make sure word chosen is not word that exists
         PickAWord = HalBrain.ChooseSentenceFromFile("TableName")
         If LCase(PickAWord) = LCase(TextCheck) Then   
         PickAWord = HalBrain.ChooseSentenceFromFile("TableName")
         Do Until LCase(TextCheck) <> LCase(PickAWord)
         Exit Do
         Loop
         End If
'Add new word to new document
                        If PickAWord <> "" Then
                             HalBrain.AppendFile(DifferentTextFile,PickAWord)
                        End If
Again, that method only works about 50 percent of the time for some reason. Any ideas? 
Thanks, 
Spitfire2600