hi, I wrote the code below to extract text from MS Worddoc. it's working well except when it reads the last word of the paragraph I guess it read the new line as well, fro example when I retrieve the length of last token it returns the length of the token plus one.since I wanna compare this token with others I need to be only characters. I'd appreciate your idea to fix this bug, thanks
I don't know how MS Word delimits its lines, but a Windows text file uses \r\n. I don't see \r in your list of delimiters, so that could be it. You say the last token is one character bigger than you expect. Can you look at that last character? That would be the easiest way to diagnose the problem.
Greg Charles wrote:I don't know how MS Word delimits its lines, but a Windows text file uses \r\n. I don't see \r in your list of delimiters, so that could be it. You say the last token is one character bigger than you expect. Can you look at that last character? That would be the easiest way to diagnose the problem.