Results 1 to 11 of 11

Thread: Is it possible to use the grammer correction feature in Word?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Question Is it possible to use the grammer correction feature in Word?

    I have a huge word list in text that I needs to have each word flaged with a 1 or 0 to specify that the word can\cannot be used after "a", "an", or "the" in a sentance. One way I thought of doing this is by pasting text from the file to Word, and then using it as a 'grammer checker' Is this even possible? Does anyone have any suggestions on how to go about this?

    Thanx...

    Aries

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Is it possible to use the grammer correction feature in Word?

    Oh I thought it would never be asked! Look at my signature, I have two complete examples (one VB6 and one VB.NET) of using the Word spell checker in an app. You can check or uncheck the grammer etc. all from VB.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Re: Is it possible to use the grammer correction feature in Word?

    Thanks that really helps!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Re: Is it possible to use the grammer correction feature in Word?

    Now is it possible to use the results in VB?

    IE.

    If not grammaticallyCorrect then

    doSomething.Doit

    End if

    I hope its not too confusing but I need to know wheather or not the text was grammatically inncorrect.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Is it possible to use the grammer correction feature in Word?

    My code examples are in vb and not Word. You can pass a textbox text and have it check for spelling and/or grammer errors and correct them.


    VB Code:
    1. If Text1.Text <> SpellMe(Text1.Text) Then
    But you didnt state which VB version your needing to use?
    You could modify the code or add another function that would only check for either spelling and/or grammer errors.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Re: Is it possible to use the grammer correction feature in Word?

    Oops, I'm using VB 6

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Is it possible to use the grammer correction feature in Word?

    In my vb6 code example these lines are where you would want to handle just checking spelling or grammer errors.
    VB Code:
    1. oDoc.Words.First.InsertBefore msSpell
    2. iWSE = oDoc.SpellingErrors.Count
    3. iWGE = oDoc.GrammaticalErrors.Count '<--Handle or msgbox grammer errors using this
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Re: Is it possible to use the grammer correction feature in Word?

    ok Im almost home... is there a way for me to simulate a button press on the dialog box?
    I have it able to run through an entire list accept I need to press a button to proceed to the next word in the file. So can you help me think of a way to do this? The dialog box needs to be visible or else the word progam cannot be activated may there is another way?

    Thanx for your help...

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Is it possible to use the grammer correction feature in Word?

    So your saying that the spell checker needs to be completely hidden and auto correct? If this is correct I will see what I can come up with then.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    86

    Re: Is it possible to use the grammer correction feature in Word?

    What I need is to be able to get the results of the grammer check for a list of words in a text file. Im able to feed the text file to the program and have it check each word in a loop, but every time there is an error I have to manually tell the program to continue by clicking 'change' or 'ignore' etc. I hope this clears thing up a bit and thanx for all of your help!

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Is it possible to use the grammer correction feature in Word?

    I cant find a way to access the grammer suggestions list as there is no method for them, but there is one for spelling errors. So an autocorrect, behind the scenes, spelling corrector is possible, but not Grammer that I have seen yet. I will continue on a bit more..
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width