I really don't have the time to go through your code right now. But if it were my project I would simply put the contents of your text file in a CString variable and use the CString::GetLength() fn to get the character count and use the CString::Find(..) fn in a loop counting the spaces to get the word count. Art