What I'm actually trying to do is implementing a button to compute the Gunning fog index. What I would normally do in anything other than VBA is:
- Provide a dictionary of words considered to be "complex" (to be compiled from professional jargon that should be used only when necessary)
- Get the list of words in the document.
- Determine the length of this list.
- Get the number of sentences (possibly just the number of "dot whitespace" occurrences) and determine the average words/sentence
- Filter the list of words the "complex" words and compare the length of the "complex word list" with the length of the "word list".
What I don't know how to do is how to get an object "this documents.wordList", and what are the "length", and "filter is-complex" methods would be.
This doesn't need to be specially elegant, it's for personal use only.