Prying secrets...
Mar. 3rd, 2014 09:54 amYesterday, I mentioned running into some VBA code that purported to do a count of the number of words in revised text. Specifically, upon encountering the addition
As far as I can tell, the reason for this is that each comma, whether it stands alone (as in the case of the first comma) or is "stuck" to some text (as in the case of the comma after the number 23), is counted as a word, as is the hyphen in "386-FZ".
I have also determined that, for some squirrely reason, the word count for a revision that starts with a space character considers said space to be a word. (In other words, if the Word insertion point is sitting at the end of a word and you type a space followed by one word, the count is 2; if the insertion point is sitting after the space at the end of said word and you type the inserted word and a space, the count is 1).
Hypothesis 1: There exist other characters that increment the word count.
Hypothesis 2: This function may exhibit other bad habits.
Meanwhile, I managed to figure out a way to do an accurate word count of added revised words. The basic scheme is this:
Cheers...
, Law 386-FZ of December 23, 2010the function returns a value of 10.
As far as I can tell, the reason for this is that each comma, whether it stands alone (as in the case of the first comma) or is "stuck" to some text (as in the case of the comma after the number 23), is counted as a word, as is the hyphen in "386-FZ".
I have also determined that, for some squirrely reason, the word count for a revision that starts with a space character considers said space to be a word. (In other words, if the Word insertion point is sitting at the end of a word and you type a space followed by one word, the count is 2; if the insertion point is sitting after the space at the end of said word and you type the inserted word and a space, the count is 1).
Hypothesis 1: There exist other characters that increment the word count.
Hypothesis 2: This function may exhibit other bad habits.
Meanwhile, I managed to figure out a way to do an accurate word count of added revised words. The basic scheme is this:
do a word count, save the result as "start"The number remaining at the end is the count of added revised words.
for each revision in the document
if the revision is an insert
delete it
next revision
do a word count, subtract the result from "start"
Cheers...