Consulting

Results 1 to 6 of 6

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
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    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.

  4. #4
    Unfortunately, Microsoft Word's grammar-checking functionality does not have a built-in method to highlight specific grammatical errors in the same way that it highlights spelling errors. Instead, when Word detects a grammatical error, it simply underlines the entire phrase or sentence in green.
    mapquest driving directions

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,050
    Location
    Welcome to the VBAX forum CelineDion. This thread is getting a little old. If you feel the need to contribute, please consider starting a new thread.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6
    Aussiebear, thanks you!

Posting Permissions

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