In an Word addin, I'm using
this.Application.ActiveDocument.Words;
to get a list of all the words in the curret document. Now when I parse this list, I found the ,, . and \r are also in this list. Why is Word considering these 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.
Looks like it's a feature.
from: here
Note Punctuation and paragraph marks in a document are included in the Words collection.
also found:
If SingleWord < "A" Or SingleWord > "z" Then SingleWord = "" 'Out of range?
here
which says to me you can exclude punctuation from your set by testing for 'words' less than A or greater than z.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论