Characters.Count vs. ComputeStatistics 
Author Message
 Characters.Count vs. ComputeStatistics

Why does

ActiveDocument.Characters.count

give a different larger answer than

ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces, true)

Thanks,
Sameer



Sat, 24 May 2003 03:00:00 GMT  
 Characters.Count vs. ComputeStatistics
Hi Sameer,

Not in all situations, look at following:
Dim ComputewdStatistics As Long
Dim CharCount As Long
ComputewdStatistics = ActiveDocument.ComputeStatistics( _
    wdStatisticCharactersWithSpaces, True)
CharCount = ActiveDocument.Characters.Count

from the immediate window:
? ComputewdStatistics
 24004
? CharCount
 23953

Elaborate some more on your's ...
What does your document look like ...
in terms of Footnotes, Fields .... etc.

Rgrds,
Perry


Quote:
> Why does

> ActiveDocument.Characters.count

> give a different larger answer than

> ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces, true)

> Thanks,
> Sameer



Sun, 25 May 2003 03:00:00 GMT  
 Characters.Count vs. ComputeStatistics

I guess my question is not why there one is larger or smaller, but why is
there a difference at all?  The document that I am looking at has no
footnotes or endnotes.
I am using Word from MS-Office 2000, Small Business Edition, original
release (not SR-1) on Windows 2000 Professional.

Thanks,
Sameer


Quote:
> Hi Sameer,

> Not in all situations, look at following:
> Dim ComputewdStatistics As Long
> Dim CharCount As Long
> ComputewdStatistics = ActiveDocument.ComputeStatistics( _
>     wdStatisticCharactersWithSpaces, True)
> CharCount = ActiveDocument.Characters.Count

> from the immediate window:
> ? ComputewdStatistics
>  24004
> ? CharCount
>  23953

> Elaborate some more on your's ...
> What does your document look like ...
> in terms of Footnotes, Fields .... etc.

> Rgrds,
> Perry


> > Why does

> > ActiveDocument.Characters.count

> > give a different larger answer than

> > ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces, true)

> > Thanks,
> > Sameer



Sun, 25 May 2003 03:00:00 GMT  
 Characters.Count vs. ComputeStatistics
Because MSFT counts things differently in each case.

Similar issue if you look at word counts.

Would you trust MSFT to count the ballots in Florida?

--
Please post your response to the newsgroup.

Quote:

> Why does

> ActiveDocument.Characters.count

> give a different larger answer than

> ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces, true)

> Thanks,
> Sameer



Mon, 26 May 2003 15:43:00 GMT  
 Characters.Count vs. ComputeStatistics
Ok, but what is the difference?  Looking at the online help does not give me
a hint.  Can you recommend a book/website where this is better documented?
Or is this a bug?

Thanks,
Sameer


Quote:
> Because MSFT counts things differently in each case.

> Similar issue if you look at word counts.

> Would you trust MSFT to count the ballots in Florida?

> --
> Please post your response to the newsgroup.

> > Why does

> > ActiveDocument.Characters.count

> > give a different larger answer than

> > ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces, true)

> > Thanks,
> > Sameer



Wed, 28 May 2003 16:10:18 GMT  
 Characters.Count vs. ComputeStatistics
Using "documented" in the sense of MSFT is an oxymoron.

This type of info is scattered about, if it even exists, in various books,
the MSFT KB, MSFT MSDN, MSFT Technet, and postings in newsgroups/web
forums/email lists.

--
Please post your response to the newsgroup.

Quote:

> Ok, but what is the difference?  Looking at the online help does not give
me
> a hint.  Can you recommend a book/website where this is better documented?
> Or is this a bug?

> Thanks,
> Sameer



> > Because MSFT counts things differently in each case.

> > Similar issue if you look at word counts.

> > Would you trust MSFT to count the ballots in Florida?

> > --
> > Please post your response to the newsgroup.

> > > Why does

> > > ActiveDocument.Characters.count

> > > give a different larger answer than

> > > ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces,
true)

> > > Thanks,
> > > Sameer



Wed, 28 May 2003 19:55:33 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. running character count

2. Counting characters as they are typed

3. counting characters in a string

4. COUNT OF CHARACTERS IN A MAIL

5. How to count the Reference Characters ?

6. Count occurances of a character string?

7. Ignore strikethrough text in document character count

8. Scanning text & objDoc.Characters.Count

9. variable character count

10. Characters count without space in VB.NET

11. Characters and Line Count

12. How to count only the characters in red?

 

 
Powered by phpBB® Forum Software