|
-
Jul 31st, 2006, 04:05 AM
#1
Frenzied Member
Re: Advanced VB/Office Guru™ SpellChecker™
 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.
-
Oct 5th, 2007, 08:44 AM
#2
New Member
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?
-
Oct 5th, 2007, 09:32 AM
#3
New Member
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
-
Aug 7th, 2008, 10:36 AM
#4
Fanatic Member
Re: Advanced VB/Office Guru™ SpellChecker™
Finally, which code I can use in my VB6 program for spell-check? Please help me out.
Thanks.
-
Aug 17th, 2008, 01:07 PM
#5
Re: Advanced VB/Office Guru™ SpellChecker™
 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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|