From: andreas on
Dear experts:

below macro that I copied from some Online VBA tutorial works in Word
2007 but inexplicably not in 2003.

Any idea why?

Help is much appreciated. Thank you very much in advance. Regards,
Andreas


Sub readabilitystatistics()
Dim StatText As String
Dim rs As Variant
StatText = "Document Statistics:" & vbCr
For Each rs In ActiveDocument.readabilitystatistics
StatText = StatText & rs.Name & " - " & rs.Value & vbCr
Next rs
MsgBox StatText

End Sub
From: Doug Robbins - Word MVP on
It works fine in Word 2003 here, returning

Document Statistics:
Words - 84505
Characters - 413533
Paragraphs - 1965
Sentences - 3950
Sentences per Paragraph - 2.3
Words per Sentence - 20.3
Characters per Word - 4.7
Passive Sentences - 0
Flesch Reading Ease - 54.9
Flesch-Kincaid Grade Level - 10.4

for the document on which I ran it.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"andreas" <andreas.hermle(a)gmx.de> wrote in message
news:b17cd39d-e08b-48fa-a56b-f02bb685cfac(a)a21g2000yqn.googlegroups.com...
> Dear experts:
>
> below macro that I copied from some Online VBA tutorial works in Word
> 2007 but inexplicably not in 2003.
>
> Any idea why?
>
> Help is much appreciated. Thank you very much in advance. Regards,
> Andreas
>
>
> Sub readabilitystatistics()
> Dim StatText As String
> Dim rs As Variant
> StatText = "Document Statistics:" & vbCr
> For Each rs In ActiveDocument.readabilitystatistics
> StatText = StatText & rs.Name & " - " & rs.Value & vbCr
> Next rs
> MsgBox StatText
>
> End Sub

From: andreas on
On 13 Mai, 23:03, "Doug Robbins - Word MVP" <d...(a)REMOVECAPSmvps.org>
wrote:
> It works fine in Word 2003 here, returning
>
> Document Statistics:
> Words - 84505
> Characters - 413533
> Paragraphs - 1965
> Sentences - 3950
> Sentences per Paragraph - 2.3
> Words per Sentence - 20.3
> Characters per Word - 4.7
> Passive Sentences - 0
> Flesch Reading Ease - 54.9
> Flesch-Kincaid Grade Level - 10.4
>
> for the document on which I ran it.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>
> "andreas" <andreas.her...(a)gmx.de> wrote in message
>
> news:b17cd39d-e08b-48fa-a56b-f02bb685cfac(a)a21g2000yqn.googlegroups.com...
>
>
>
> > Dear experts:
>
> > below macro that I copied from some Online VBA tutorial works in Word
> > 2007 but inexplicably not in 2003.
>
> > Any idea why?
>
> > Help is much appreciated. Thank you very much in advance. Regards,
> > Andreas
>
> > Sub readabilitystatistics()
> > Dim StatText As String
> > Dim rs As Variant
> > StatText = "Document Statistics:" & vbCr
> > For Each rs In ActiveDocument.readabilitystatistics
> > StatText = StatText & rs.Name & " - " & rs.Value & vbCr
> > Next rs
> > MsgBox StatText
>
> > End Sub- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Hi Doug,

ok, thanks for double-checking. Still it does not work on my machine.
May something is wrong with my normal.dot. I keep trying.

Thank you. Regards, Andreas
From: Chunsheng Li on

why the passive sentences is zero?

"andreas" wrote:

> On 13 Mai, 23:03, "Doug Robbins - Word MVP" <d...(a)REMOVECAPSmvps.org>
> wrote:
> > It works fine in Word 2003 here, returning
> >
> > Document Statistics:
> > Words - 84505
> > Characters - 413533
> > Paragraphs - 1965
> > Sentences - 3950
> > Sentences per Paragraph - 2.3
> > Words per Sentence - 20.3
> > Characters per Word - 4.7
> > Passive Sentences - 0
> > Flesch Reading Ease - 54.9
> > Flesch-Kincaid Grade Level - 10.4
> >
> > for the document on which I ran it.
> >
> > --
> > Hope this helps.
> >
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
> >
> > Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
> >
> > "andreas" <andreas.her...(a)gmx.de> wrote in message
> >
> > news:b17cd39d-e08b-48fa-a56b-f02bb685cfac(a)a21g2000yqn.googlegroups.com...
> >
> >
> >
> > > Dear experts:
> >
> > > below macro that I copied from some Online VBA tutorial works in Word
> > > 2007 but inexplicably not in 2003.
> >
> > > Any idea why?
> >
> > > Help is much appreciated. Thank you very much in advance. Regards,
> > > Andreas
> >
> > > Sub readabilitystatistics()
> > > Dim StatText As String
> > > Dim rs As Variant
> > > StatText = "Document Statistics:" & vbCr
> > > For Each rs In ActiveDocument.readabilitystatistics
> > > StatText = StatText & rs.Name & " - " & rs.Value & vbCr
> > > Next rs
> > > MsgBox StatText
> >
> > > End Sub- Zitierten Text ausblenden -
> >
> > - Zitierten Text anzeigen -
>
> Hi Doug,
>
> ok, thanks for double-checking. Still it does not work on my machine.
> May something is wrong with my normal.dot. I keep trying.
>
> Thank you. Regards, Andreas
> .
>
From: andreas on
On 16 Mai, 01:53, Chunsheng Li <Chunshen...(a)discussions.microsoft.com>
wrote:
> why the passive sentences is zero?
>
>
>
> "andreas" wrote:
> > On 13 Mai, 23:03, "Doug Robbins - Word MVP" <d...(a)REMOVECAPSmvps.org>
> > wrote:
> > > It works fine in Word 2003 here, returning
>
> > > Document Statistics:
> > > Words - 84505
> > > Characters - 413533
> > > Paragraphs - 1965
> > > Sentences - 3950
> > > Sentences per Paragraph - 2.3
> > > Words per Sentence - 20.3
> > > Characters per Word - 4.7
> > > Passive Sentences - 0
> > > Flesch Reading Ease - 54.9
> > > Flesch-Kincaid Grade Level - 10.4
>
> > > for the document on which I ran it.
>
> > > --
> > > Hope this helps.
>
> > > Please reply to the newsgroup unless you wish to avail yourself of my
> > > services on a paid consulting basis.
>
> > > Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>
> > > "andreas" <andreas.her...(a)gmx.de> wrote in message
>
> > >news:b17cd39d-e08b-48fa-a56b-f02bb685cfac(a)a21g2000yqn.googlegroups.com...
>
> > > > Dear experts:
>
> > > > below macro that I copied from some Online VBA tutorial works in Word
> > > > 2007 but inexplicably not in 2003.
>
> > > > Any idea why?
>
> > > > Help is much appreciated. Thank you very much in advance. Regards,
> > > > Andreas
>
> > > > Sub readabilitystatistics()
> > > > Dim StatText As String
> > > > Dim rs As Variant
> > > > StatText = "Document Statistics:" & vbCr
> > > > For Each rs In ActiveDocument.readabilitystatistics
> > > > StatText = StatText & rs.Name & " - " & rs.Value & vbCr
> > > > Next rs
> > > > MsgBox StatText
>
> > > > End Sub- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -
>
> > Hi Doug,
>
> > ok, thanks for double-checking. Still it does not work on my machine.
> > May something is wrong with my normal.dot. I keep trying.
>
> > Thank you. Regards, Andreas
> > .- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Dear Li, dear Doug,

I now know why it is not working. The text to be checked has to have
just one language set, say the language is set to US-English. The file
I was gonna run the readability statistics had two different languages
settings. This will not work.

Thank you very much for your help.

Regards, Andreas