When is a word not a word? Different counts by vba and status bar
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
When is a word not a word? Different counts by vba and status bar
When I use vba to count the number of words in a document, I get a result different from what I see in the status bar or would count manually.
What is being counted as a word in vba that is not what I might consider to be a word?
You do not have the required permissions to view the files attached to this post.
Last edited by Charles Kenyon on 12 Sep 2020, 00:47, edited 1 time in total.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- Administrator
- Posts: 78232
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: When is a word not a word? Different counts by vba and status bar
ActiveDocument.Words.Count includes a lot of stuff that we normally don't consider to be words. Why? Microsoft's ways are inscrutable.
ActiveDocument.ComputeStatistics(wdStatisticWords) returns the value you would expect.
ActiveDocument.ComputeStatistics(wdStatisticWords) returns the value you would expect.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: When is a word not a word? Different counts by vba and status bar
I know that over the years I have found three, possibly four different count results reurned for the one chunk of text.Charles Kenyon wrote: ↑05 Sep 2020, 20:15When I use vba to count the number of words in a document, I get a result different from what I see in the status bar or would count manually.
There is File, Properties, Statistics,
then there is a field {INFO NumWords}
then there is a VBA proprty e.g. "activedocument.Words.Count"
I don't know the answer to this. One way to find out would be to pare down an example of text with differing counts until the counts agree, and then recall the most recently-pared item of punctuation.What is being counted as a word in vba that is not what I might consider to be a word?
Me? I am still smarting over the forum's search engine treating the hyphen as a space in "uh-oh" (grin)
Cheers
chris
An expensive day out: Wallet and Grimace
-
- Microsoft MVP
- Posts: 1312
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: When is a word not a word? Different counts by vba and status bar
The ActiveDocument.Words collection includes punctuation marks (periods, commas, question and exclamation marks, quotes, and others, but not apostrophes) and paragraph marks as separate "words". For some reason a manual line break (Shift+Enter) is counted as two words. The other methods of getting word counts ignore these things.
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: When is a word not a word? Different counts by vba and status bar
Thank you Hans and Chris.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: When is a word not a word? Different counts by vba and status bar
And Jay "a manual line break (Shift+Enter) is counted as two words" Freedman.
Don't forget to assign some blame to Jay for adding spice to the witches brew (Huge grin!)
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- Microsoft MVP
- Posts: 1312
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: When is a word not a word? Different counts by vba and status bar
Well, Halloween is less than 60 days away. The local market has already stocked up on candy and spiced wafers, so I'm just getting into the spirit (or is that spirits?).ChrisGreaves wrote: ↑06 Sep 2020, 09:39Don't forget to assign some blame to Jay for adding spice to the witches brew (Huge grin!)
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: When is a word not a word? Different counts by vba and status bar
Thank you, Jay, as well.
I quoted you in response to a related question in another file. Apparently the Windows explorer count of words is related to the vba definition.
This should be scary enough for anyone.
I quoted you in response to a related question in another file. Apparently the Windows explorer count of words is related to the vba definition.
This should be scary enough for anyone.
You do not have the required permissions to view the files attached to this post.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- Microsoft MVP
- Posts: 1312
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: When is a word not a word? Different counts by vba and status bar
Interestingly, Bob wrote that 20 years ago. Plus ça change, plus ça même chose.
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: When is a word not a word? Different counts by vba and status bar
I now have a different meme...
You do not have the required permissions to view the files attached to this post.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: When is a word not a word? Different counts by vba and status bar
Hello Charles.Charles Kenyon wrote: ↑05 Sep 2020, 20:15What is being counted as a word in vba that is not what I might consider to be a word?
You have by now read this directive, Right?
Washington State Appellate Filings Word Counts
Boy! It sure looks like a complicated procedure.
(a) I wonder why they don't suggest "filter via Notepad.exe" to drop images etc
(b) Since the courts seem to want to reduce verbiage, why not INCLUDE "the title sheet, the table of contents, the table of authorities, the certificate of compliance, the certificate of service, signature blocks" in the count? A limit is a limit is a limit, right?
Cheers
Chris
P.S. depending on the method used, that article comes out to around 930 words.
C
An expensive day out: Wallet and Grimace
-
- UraniumLounger
- Posts: 9211
- Joined: 13 Feb 2010, 01:27
- Location: Deep in the Heart of Texas
Re: When is a word not a word? Different counts by vba and status bar
So I guess my brief typed on my IBM Executive typewriter will be accepted so long as I observe the limit on number of pages. I wonder if they will accept carbon copies? Yes, I still have carbon paper and Liquid Paper for corrections.. . . Additionally, a document produced using a typewriter can continue to use 12 point font. . . .
Signed,
Mr. Luddite, Esq.
Bob's yer Uncle
Intel Core i5, 3570K, 3.40 GHz, 16 GB RAM, ECS Z77 H2-A3 Mobo, Windows 10 >HPE 64-bit, MS Office 2016
(1/2)(1+√5) |
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: When is a word not a word? Different counts by vba and status bar
But do you have onion skin for the copies?
Wisconsin appellate courts have had Word count limits for more than 20 years. That is where I practice.
Wisconsin appellate courts have had Word count limits for more than 20 years. That is where I practice.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- 5StarLounger
- Posts: 720
- Joined: 21 Aug 2011, 21:01
- Location: The beautiful hills of Western North Carolina
Re: When is a word not a word? Different counts by vba and status bar
Well, what Judges really care about is the meat of the case, that the authors get to the point, and that the courts will choke on less paper. Back in the olden days of page limitations, when the font was courier and the word processor was an IBM Selectric, page limitations were usually enough.ChrisGreaves wrote: ↑29 Aug 2021, 19:18Since the courts seem to want to reduce verbiage, why not INCLUDE "the title sheet, the table of contents, the table of authorities, the certificate of compliance, the certificate of service, signature blocks" in the count? A limit is a limit is a limit, right?
In later years, armed with computers and proportional fonts, clever word processors, secretaries, paralegals, and attorneys found ways to get around page limitations: use a slightly smaller font, use character spacing to move letters just barely closer together, put arguments within footnotes because footnotes are (usually) single spaced, and use a smaller font for the footnotes, to boot. The other pages are not necessary to arguing the case, but are helpful tools for reviewing the meat of the document. Some are required for valid legal reasons, such as the certificate of service. Limiting the number of words rather than pages made these resourceful tricks unnecessary.
Kim
"Hmm. What does this button do?" Said everyone before being ejected from a car, blown up, or deleting all the data from the mainframe.
-
- 4StarLounger
- Posts: 596
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: When is a word not a word? Different counts by vba and status bar
It is complicated. The appellate judges do not read "the title sheet, the table of contents, the table of authorities, the certificate of compliance, the certificate of service, signature blocks" but use those to jump around or find things. The certificates are checked by the clerks and do not influence how a case is decided but rather whether the brief meets the rules for submission.ChrisGreaves wrote: ↑29 Aug 2021, 19:18Hello Charles.Charles Kenyon wrote: ↑05 Sep 2020, 20:15What is being counted as a word in vba that is not what I might consider to be a word?
You have by now read this directive, Right?
Washington State Appellate Filings Word Counts
Boy! It sure looks like a complicated procedure.
(a) I wonder why they don't suggest "filter via Notepad.exe" to drop images etc
(b) Since the courts seem to want to reduce verbiage, why not INCLUDE "the title sheet, the table of contents, the table of authorities, the certificate of compliance, the certificate of service, signature blocks" in the count? A limit is a limit is a limit, right?
Cheers
Chris
P.S. depending on the method used, that article comes out to around 930 words.
C
When I first started practicing, briefs were printed professionally and the page count was sufficient. The idea is to keep lawyers writing these things succinct in their arguments.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word