Results 1 to 40 of 101

Thread: Advanced VB/Office Guru™ SpellChecker™

Hybrid View

  1. #1
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Advanced VB/Office Guru™ SpellChecker™

    Quote Originally Posted by RobDog888
    Thats not in my code example but it loks like your missing a class or control in your project.
    Thanks for u reply. Oh i was thinking it was u code but now i tried your code and i get the following error:

    Compile error:

    User-defined type not defined

    and pointing at :

    Public moApp As Word.Application


    could u help me fix this error. I added one button and a textbox to the project. What else do i need such as refrences or any other controles?

    Furthermore, is it possible to underline the spelling mistakes as we type and by clicking on mistake it gives suggestions? Also is it possible to make this program so it only does what i just described on external editboxes ? I be happy if u help me here.Thanks
    Last edited by tony007; Jul 31st, 2006 at 04:33 AM.

  2. #2
    New Member
    Join Date
    Oct 2007
    Posts
    2

    Re: Advanced VB/Office Guru™ SpellChecker™

    I am using the code in an access 2000 database. I have a richtextbox using it as a mini-word application. When I run the code it says the spelling is complete (no spelling errors) but it's clear that I do have them. I will just type in a bunch of letters and it passes.

    I noticed then in word it would do the same thing, I had to delete the custom.dic file to get word correctly working again with the default dictionary. However the problem still presists in my application.

    Has anyone got this working in an access or richtextbox environment?

  3. #3
    New Member
    Join Date
    Oct 2007
    Posts
    2

    Re: Advanced VB/Office Guru™ SpellChecker™

    For RichTextBoxes I found another piece of code that works much better. Create a button and put this in the code. RTFText is the name of your RichTextBox. I'm using this in Access 2000 and it is working great.

    Code:
    On Error GoTo SpellCheckErr
    	Dim oWord As Object
    
    	Set oWord = CreateObject("Word.Application")
    
    	'Save the RTF Box contents to a temporary file
    	rtfText.SaveFile "C:\TEST.RTF", rtfRTF
    
    	'Open the saved document and spellcheck it
    	oWord.Documents.Open ("C:\TEST.RTF")
    	oWord.ActiveDocument.SpellingChecked = False
    	oWord.Options.IgnoreUppercase = False
    	oWord.ActiveDocument.CheckSpelling
    
    	'Save the changes to the RTF file & close
    	oWord.ActiveDocument.Save
    	oWord.ActiveDocument.Close
    	oWord.Quit
    
    	'Load the changes back to the rtf text box.
    	rtfText.LoadFile "C:\TEST.RTF", rtfRTF
    
    	Set oWord = Nothing
    	Screen.MousePointer = vbDefault
    	MsgBox "Spell Check is complete", _
    		vbInformation, "Spell Check"
    	Exit Sub
    
    SpellCheckErr:
    	MsgBox Err.Description, vbCritical, _
    		"Spell Check"
    	Set oWord = Nothing

  4. #4
    Fanatic Member
    Join Date
    May 2007
    Posts
    788

    Re: Advanced VB/Office Guru™ SpellChecker™

    Finally, which code I can use in my VB6 program for spell-check? Please help me out.

    Thanks.

  5. #5

    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™

    Quote Originally Posted by VBLearner6
    Finally, which code I can use in my VB6 program for spell-check? Please help me out.

    Thanks.
    Whats your question/issue?
    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