Consulting

Results 1 to 3 of 3

Thread: How to use Application.CheckGrammar

  1. #1

    How to use Application.CheckGrammar

    I was looking for a way to check the spelling of a Reviewers Comments in Word but was unsuccessful. I have written code that can identify spelling errors in a Comment and allow the user to type in the correct spelling to remove the spelling error. The code works by using Application.CheckSpelling(commenttext) to determine if there is a spelling somewhere in the text string. It then iterates through each word to find the spelling mistake. This works perfectly.

    However, using the same approach with Application.CheckGrammar, it can find that there is a grammatical error in the comment text but cannot tell me what the error is. The example is: "This is comment thee", obviously it should be "three", the Application.CheckSpelling(commenttext) returns False because of the error but cannot tell be it is because the word is thee not three.

    Does anyone have any suggestions. Thanks in advance.

  2. #2
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,273
    Location
    There is no need to process each word to find the spelling error. You might want to read the discussion at: http://www.msofficeforums.com/word-v...n-without.html

    As noted there, though,
    VBA has no GetGrammarSuggestions equivalent to GetSpellingSuggestions
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Thanks, interesting thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •