Hello,
I know that I can get the readability statistics when I execute a grammar
check, but is there a way to simply execute the readability statistics
without running a complete grammar check. Just run it on the text as is? i
am specifically trying to get the Flesch score for a document at the click of
a button without any interaction on the behalf of the user.
Thank you,
QB
Jean-Guy Marcil - 21 Feb 2008 15:38 GMT
> Hello,
>
[quoted text clipped - 3 lines]
> am specifically trying to get the Flesch score for a document at the click of
> a button without any interaction on the behalf of the user.
Sub Readability()
Dim rsDoc As ReadabilityStatistic
Set rsDoc = ActiveDocument.Range.ReadabilityStatistics(9)
MsgBox "Readability for this document: " & rsDoc.Value & "."
End Sub
You may need to add code to make sure that the whole document is set to the
same language or an error will be generated.
Charlie Mac - 21 Feb 2008 20:22 GMT
QB,
Try this:
Dim rs As Variant ' ReadabilityStatistics, StatText as string
StatText = "Document Statistics:" & vbCr
For Each rs In Documents(1).ReadabilityStatistics
StatText = StatText & rs.Name & " - " & rs.Value & vbCr
Next rs
MsgBox StatText
Charlie in Texas
>Hello,
>
[quoted text clipped - 7 lines]
>
>QB