none
Invalid words list returned by word RRS feed

  • Question

  • helo

    I'm using 

    this.Application.ActiveDocument.Words;
    

    to get a list of all the words in the curret document. Now when I parsel this list I found the "," and "." and "\r" are also in this list. Why is word considering these as words. I also looked at the word count in the status bar and that was wrong too, as for 7 words in my document the status bar shows 9 words.

    I don't get the point here. Pls help.

    Wednesday, March 16, 2011 6:37 PM

Answers

  • Hi,

    Application.ActiveDocument.Words returns a collection that contains letters, numbers, separator characters, and so on. You can remove separator characters and others that you do not want to display when you get the collection. If you only want to get the number of words, you should use the ComputeStatistics method. Here is an article tell us how to list the words contained in Word document.
    http://www.vb-helper.com/howto_list_doc_words.html

    I hope this can help you resolve your problem.

     


    SeeSeaIng
    Thursday, March 17, 2011 4:49 AM