Results 1 to 40 of 101

Thread: Advanced VB/Office Guru™ SpellChecker™

Hybrid View

  1. #1

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

    Re: Advanced VB/Office Guru™ SpellChecker™

    If your using Access only then you dont need any of the code other then using Access' built in spell checking.
    VB Code:
    1. Private Sub SpellMe()
    2.     Application.DoCmd.RunCommand acCmdSpelling
    3. End Sub
    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

  2. #2
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    262

    Re: Advanced VB/Office Guru™ SpellChecker™

    Sorry, getting confused in my old age, anyway the problem with that is it automatically checks the whole form which I don't want, as the form in question is huge.
    Currently I spell check like so.

    VB Code:
    1. Public Function Spellcheck(TextStr As String) As String
    2.  
    3.      Set WordApp = CreateObject("Word.Application")
    4.      WordApp.Documents.Add
    5.      Dim wordrange As Word.Range
    6.      Set wordrange = WordApp.ActiveDocument.Range(0, 0)
    7.      wordrange.Text = TextStr
    8.      WordApp.Visible = True
    9.      WordApp.Activate
    10.      wordrange.CheckSpelling , , True
    11.      wordrange.CheckGrammar
    12.      Spellcheck = wordrange.Text
    13.      wordrange.Text = ""
    14.      WordApp.Documents.Close (False)
    15.      WordApp.Quit
    16.      Set WordApp = Nothing
    17. End Function

    But this has odd glitches which I was hoping your code would sort out.

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