You could do a search for each word, then if it's not found, add it.
I'm going to presume that this is going to be used in conjunction with an on text event. If this is the case, I'd like to point out that using a text file is the slowest way of storing information that needs to be accessed.
I'd highly recommend that you consider forgetting about the text file, and use a hash table instead. If you need assistance with creating/using a hash table, I'd be more than happy to assist.