VBA Gerus,

If my code selects a word in a document (e.g., "while"), how do I
determine if the word is part of a grammar error without stepping
through each error in the document to locate it?

The code "For Each MisWord In ActiveDocument.GrammaticalErrors" can be
used to step through and identity each error, but what I need is to be
on a word and determine if it is part of a grammar error.

Thanks.

Charlie from Texas

Re: Identifying a grammar error by Tony

Tony
Wed Feb 27 10:57:34 PST 2008

I guess you should use it with caution - but no more caution than the whole
collection or anything else to do with grammar.

Selection.Range.GrammaticalErrors.Count

should be >0 if the selection is part of a grammatical error.

--
Enjoy,
Tony

"Charlie Mac" wrote in message
news:9luas3t4mo9mp6q4rgnmdekgl9a34fskas@4ax.com...
> VBA Gerus,
>
> If my code selects a word in a document (e.g., "while"), how do I
> determine if the word is part of a grammar error without stepping
> through each error in the document to locate it?
>
> The code "For Each MisWord In ActiveDocument.GrammaticalErrors" can be
> used to step through and identity each error, but what I need is to be
> on a word and determine if it is part of a grammar error.
>
> Thanks.
>
> Charlie from Texas


Re: Identifying a grammar error by Charlie

Charlie
Wed Feb 27 11:21:31 PST 2008

Tony,

That is exactly what I needed. Thank you.

Take care,

Charlie from Texas

On Wed, 27 Feb 2008 18:57:34 -0000, "Tony Jollans" <My forename at my
surname dot com> wrote:

>I guess you should use it with caution - but no more caution than the whole
>collection or anything else to do with grammar.
>
> Selection.Range.GrammaticalErrors.Count
>
>should be >0 if the selection is part of a grammatical error.