Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2008

Tip: Looking for answers? Try searching our database.

Identifying a grammar error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charlie Mac - 27 Feb 2008 15:00 GMT
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
Tony Jollans - 27 Feb 2008 18:57 GMT
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.

Signature

Enjoy,
Tony

> VBA Gerus,
>
[quoted text clipped - 9 lines]
>
> Charlie from Texas
Charlie Mac - 27 Feb 2008 19:21 GMT
Tony,

That is exactly what I needed.  Thank you.

Take care,

Charlie from Texas

>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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.