-
Jul 31st, 2006, 09:57 AM
#41
Re: Advanced VB/Office Guru™ SpellChecker™
Early binding:
Add a reference to MS Word xx.0 Object Library
It may be possible to catch spelling mistakes as you type but it would need calls to spellcheck after each keypress. What do you mean "external textboxes"? Not your program but someone elses? If so that would also be possible but not something that would be very easy.
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
-
Dec 6th, 2006, 05:06 AM
#42
Fanatic Member
Re: Advanced VB/Office Guru™ SpellChecker™
RobDog, Martin,
Did you ever get this converted or working with the vb-forum tool?
Cheers Al
-
Dec 6th, 2006, 05:09 AM
#43
Re: Advanced VB/Office Guru™ SpellChecker™
No I didnt at least but I did start working on writting an AddOn for IE7
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
-
Dec 21st, 2006, 06:34 AM
#44
Fanatic Member
Re: Advanced VB/Office Guru™ SpellChecker™
Hi,
I've attempted to translate this code into vbscript for use with the vb-world forum tool
Can be easily altered to be used with regular web forms
Cheers Al
-
Jan 8th, 2007, 06:12 PM
#45
Addicted Member
Re: Advanced VB/Office Guru™ SpellChecker™
Hi, I just have one question. Is there a way to have spellcheck, but just like do it all in the background. like have a array of words to either check (true and keep) or don't (false and throw-out) If this thread is too old or something and I'm posting on a dead thread, just tell me. I'm not sure what the rules are on all that. Thanks
-
Jan 8th, 2007, 06:28 PM
#46
Re: Advanced VB/Office Guru™ SpellChecker™
The thread is still alive lol.
Yes, you can get the spelling suggestions with the GetSpellingSuggestions function which returns a collection of possible spelling replacements.
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
-
Jan 8th, 2007, 07:01 PM
#47
Addicted Member
Re: Advanced VB/Office Guru™ SpellChecker™
One more thing. if you would. maybe this should go somewhere else. but anyway. I saw the reference I needed but now I've found out I need to link it. and I'm not sure how I am to go about this. (never done it before)
-
Jan 8th, 2007, 07:26 PM
#48
Addicted Member
Re: Advanced VB/Office Guru™ SpellChecker™
I'm trying to use your module and then use moApp.Checkspelling("ttest")
and I don't know why but it says that:
Run-time error '91':
Object variable or with block variable not set
//
I don't understand.
-
Jan 8th, 2007, 11:43 PM
#49
Re: Advanced VB/Office Guru™ SpellChecker™
Are you calling the InitializeMe procedure first anywhere in your app?
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
-
Jan 15th, 2007, 05:36 PM
#50
Hyperactive Member
Re: Advanced VB/Office Guru™ SpellChecker™
Awsome code, but im havnig an issue where it closes all isntances of word... if I am working on a word document, it closes without asking me, and it shows an additional document that shows the text it is spell checking... odd
"I dont even see the code anymore... I just see Blonde, Brunette, Redhead..."
-
Jan 15th, 2007, 05:45 PM
#51
Re: Advanced VB/Office Guru™ SpellChecker™
Thanks
Place a breakpoint on the InitializeMe sub and check if the mbKillMe flag is True or False when you do have Word already running.
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
-
Jan 16th, 2007, 11:59 PM
#52
Re: Advanced VB/Office Guru™ SpellChecker™
VB Code:
'Add a reference to MS Word xx.0 Object Library
'1.Select Project From the tools menu
'2.Select Reference ,In the shown dialog box, tick the check box before
' Microsoft Word x.x object Library.
'3.Run the project
Please mark you thread resolved using the Thread Tools as shown
-
Jan 18th, 2007, 03:41 PM
#53
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
I'm wondering if you can help me out. Here is my version of the spell check code. In random occasions, I would encounter "Run-time error '462'". I looked it up on http://support.microsoft.com/kb/189618, and it seems to indicate that VB did not release the reference to word, and it interferes with automation code when the code is run more than once.
I have played around with the code to resolve the issue, but I'm out of ideas. I have even tried running some "throw-exceptions" at the end, but the code won't recognize the error number.
This issue does not happen all the time, but it seems to happen intermittantly at random times. I am wondering if any of you have had experience with this.
The following is my code and thanks for your help!
VB Code:
Public moApp As Object
Private mbKillMe As Boolean
Public Property Get KillMe() As Boolean
InitializeMe
KillMe = mbKillMe
End Property
Public Property Let KillMe(Value As Boolean)
mbKillMe = Value
End Property
Public Sub InitializeMe()
On Error Resume Next
Set moApp = GetObject(, "Word.Application")
If TypeName(moApp) <> "Nothing" Then
Set moApp = GetObject(, "Word.Application")
Else
Set moApp = CreateObject("Word.Application")
mbKillMe = True
End If
End Sub
Public Function SpellMe(ByVal msSpell As String) As String
On Error GoTo No_Bugs
Dim oDoc As Object 'Word.Document
Dim iWSE As Integer
Dim iWGE As Integer
Dim sReplace As String
Dim lResp As Long
If msSpell = vbNullString Then Exit Function
InitializeMe
Select Case moApp.Version
Case "9.0", "10.0", "11.0"
Set oDoc = moApp.Documents.Add(, , 1, True)
Case "8.0"
Set oDoc = moApp.Documents.Add
Case Else
MsgBox "Unsupported Version of Word.", vbOKOnly + vbExclamation, "VB/Office Guru™ SpellChecker™"
SpellMe = msSpell
Exit Function
End Select
Screen.MousePointer = vbHourglass
App.OleRequestPendingTimeout = 999999
oDoc.Words.First.InsertBefore msSpell
iWSE = oDoc.SpellingErrors.Count
iWGE = oDoc.GrammaticalErrors.Count
If iWSE > 0 Or iWGE > 0 Then
moApp.Assistant.On = False
moApp.Visible = False
If (moApp.WindowState = 0) Or (moApp.WindowState = 1) Then
moApp.WindowState = 2
Else
moApp.WindowState = 2
End If
moApp.Dialogs(828).Application.Options.CheckGrammarWithSpelling = True
moApp.Dialogs(828).Application.Options.SuggestSpellingCorrections = True
moApp.Dialogs(828).Application.Options.IgnoreUppercase = True
moApp.Dialogs(828).Application.Options.IgnoreInternetAndFileAddresses = True
moApp.Dialogs(828).Application.Options.IgnoreMixedDigits = False
moApp.Dialogs(828).Application.Options.ShowReadabilityStatistics = False
moApp.Visible = True
moApp.Activate
lResp = moApp.Dialogs(828).Display
If lResp < 0 Then
moApp.Visible = True
MsgBox "Corrections Being Updated!", vbOKOnly + vbInformation, App.ProductName
Clipboard.Clear
oDoc.Select
oDoc.Range.Copy
sReplace = Clipboard.GetText(1)
If (InStrRev(sReplace, Chr(13) & Chr(10))) = (Len(sReplace) - 1) Then
sReplace = Mid$(sReplace, 1, Len(sReplace) - 2)
End If
SpellMe = sReplace
ElseIf lResp = 0 Then
MsgBox "Spelling Corrections Have Been Canceled!", vbOKOnly + vbCritical, "VB/Office Guru™ SpellChecker"
SpellMe = msSpell
End If
Else
MsgBox "No Spelling Errors Found" & vbNewLine & "Or No Suggestions Available!", vbOKOnly + vbInformation, _
"VB/Office Guru™ SpellChecker"
SpellMe = msSpell
End If
oDoc.Close False
Set oDoc = Nothing
If KillMe = True Then
moApp.Visible = False
End If
Screen.MousePointer = vbNormal
Exit Function
No_Bugs:
If Err.Number = "91" Then
SpellMe = msSpell
Resume Next
ElseIf Err.Number = "462" Then
SpellMe = msSpell
MsgBox "Spell Checking Is Temporary Un-Available!" & vbNewLine & "Make sure an e-mail message is not open.", _
vbInformation, "ActiveX Server Not Responding"
Screen.MousePointer = vbNormal
ElseIf Err.Number = 429 Then
SpellMe = msSpell
Set moApp = Nothing
Resume Next
Else
SpellMe = msSpell
MsgBox Err.Number & " " & Err.Description, vbOKOnly + vbInformation, App.ProductName
Screen.MousePointer = vbNormal
End If
End Function
-
Jan 18th, 2007, 04:08 PM
#54
Re: Advanced VB/Office Guru™ SpellChecker™
Without getting into it yet, only have limited time, have you checked to see if on those systems where you get the error if they have Outlook open and if so does it use Word as its default email editor. If it does and they have an email message open it may be being used by my spell check code as the open instance. So when they close an email its closing word and geting the 462 error.
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
-
Jan 18th, 2007, 04:24 PM
#55
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
That was one of the tests I did. I was getting the error without having outlook open.
-
Jan 19th, 2007, 10:56 PM
#56
Re: Advanced VB/Office Guru™ SpellChecker™
But did you have any email messages open either? You can have an email open without having Outlook fully open.
Also, did you check the status in the InitializeMe() sub? What is the value of mbKillMe at the end of the 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 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
-
Jan 22nd, 2007, 11:49 AM
#57
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
good advice rob.
I'll be monitoring the status of mbKillMe. This issue happens intermittantly, so I'll have to keep testing it and wait for it to pop up.
Thanks for the help.
-
Jan 30th, 2007, 10:05 PM
#58
Hyperactive Member
Re: Advanced VB/Office Guru™ SpellChecker™
VB Code:
'VB.net 2005
'Based on example fro another site, However modified.
'The example simple moved the Application off the screen which did not work well if Word every crashed during a spell check because it would start off the screen.
'This uses this example of WdWindowState.wdWindowStateMinimize
Imports System.Runtime.InteropServices
Imports Word
'Imports Microsoft.Office.Interop.Word
Public Class SpellCheck
Inherits System.Windows.Forms.Form
' Invokes either the spell or grammar checker.
Private Sub SpellOrGrammarCheck(ByVal blnSpellOnly As Boolean)
Try
' Create Word and temporary document objects.
Dim objWord As Word.Application
Dim objTempDoc As Object
' Declare an IDataObject to hold the data returned from the
' clipboard.
Dim iData As IDataObject
' If there is no data to spell check, then exit sub here.
If TextBox1.Text = "" Then
Exit Sub
End If
objWord = New Word.Application
'objWord = New Microsoft.Office.Interop.Word.Application
objTempDoc = objWord.Documents.Add
objWord.Visible = False
'Minimze word
If (objWord.ActiveWindow.WindowState <> WdWindowState.wdWindowStateMinimize) Then
objWord.ActiveWindow.WindowState = WdWindowState.wdWindowStateMinimize
End If
' Copy the contents of the textbox to the clipboard
Clipboard.SetDataObject(TextBox1.Text)
' With the temporary document, perform either a spell check or a
' complete
' grammar check, based on user selection.
With objTempDoc
.Content.Paste()
.Activate()
If blnSpellOnly Then
.CheckSpelling()
Else
.CheckGrammar()
End If
' After user has made changes, use the clipboard to
' transfer the contents back to the text box
.Content.Copy()
iData = Clipboard.GetDataObject
If iData.GetDataPresent(DataFormats.Text) Then
TextBox1.Text = CType(iData.GetData(DataFormats.Text), _
String)
End If
.Saved = True
.Close()
End With
objWord.Quit()
'MessageBox.Show("The spelling check is complete.", _
' "Spell Checker", MessageBoxButtons.OK, _
' MessageBoxIcon.Information)
' Microsoft Word must be installed.
Catch COMExcep As Runtime.InteropServices.COMException
MessageBox.Show( _
"Microsoft Word must be installed for Spell/Grammar Check " _
& "to run.", "Spell Checker")
Catch Excep As Exception
MessageBox.Show("An error has occured.", "Spell Checker")
End Try
End Sub
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnSpellCheck.Click
SpellOrGrammarCheck(True)
End Sub
'Private Sub btnGrammarCheck_Click(ByVal sender As System.Object, _
' ByVal e As System.EventArgs) Handles btnGrammarCheck.Click
' SpellOrGrammarCheck(False)
'End Sub
End Class
-
Mar 18th, 2007, 02:39 PM
#59
Re: Advanced VB/Office Guru™ SpellChecker™
Yes, I do have a VB.NET version of my code too:
http://www.vbforums.com/showthread.php?t=359879
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
-
Sep 20th, 2007, 01:06 AM
#60
New 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.
Is it possible to get those red underlines on error words detected using this spell checker?
-
Sep 27th, 2007, 07:04 PM
#61
Re: Advanced VB/Office Guru™ SpellChecker™
The Word Object Model doesnt expose that exact wavy underlinning but it does have a close similar match.
Specify the wdUnderlineWavy and .UnderlineColor to best duplicate the spellchecking spelling error identifier. Its very close.
This is in Word 2007 so I cant say its in the previous versions.
Code:
Selection.Font.Underline = wdUnderlineWavy
Selection.Font.UnderlineColor = wdColorRed
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
-
Oct 2nd, 2007, 01:26 AM
#62
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
Hi RobDog888,
For some reason when I implement your code in the system accessing localhost database it works fine, however when it is using the server database the spellcheck functionality does not function. I know it is still accessing and opening MS Word (because the temp files in MS Word keep increasing invisibly, when you open a new MS Word you realize the instance has incremented), but I am not sure how to fix this...or why this should happen.
-
Oct 5th, 2007, 08:44 AM
#63
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
#64
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
-
Oct 14th, 2007, 03:25 AM
#65
Re: Advanced VB/Office Guru™ SpellChecker™
You may run into issues with different OS' and permissions to write a file to a particular directory.
For ex. in Vista writting to the root drive is locked down and prohibited. This wopuld mean writting to some other location and dont think that yoiu could use the Program Files directory as that is locked down too. )
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
-
Dec 12th, 2007, 02:33 PM
#66
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
In your code for spelling and grammer checking, is there a way to hide the Check Grammer checkbox on the Spelling and Grammer dialog? I want to force the user to have both spelling and grammer checked without providing the option to disable the grammer checking. Also, is there a way to disable the Options button on the Spelling and Grammer dialog?
Last edited by bikertz; Dec 12th, 2007 at 04:11 PM.
-
Aug 7th, 2008, 10:36 AM
#67
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
#68
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
-
Aug 17th, 2008, 01:09 PM
#69
Re: Advanced VB/Office Guru™ SpellChecker™
Originally Posted by bikertz
In your code for spelling and grammer checking, is there a way to hide the Check Grammer checkbox on the Spelling and Grammer dialog? I want to force the user to have both spelling and grammer checked without providing the option to disable the grammer checking. Also, is there a way to disable the Options button on the Spelling and Grammer dialog?
To modify any control on Words spell checker dialog (other then prepopulating it) you would need to use a C++ dll to subclass Word and modify the dialog via APIs. A bit of work but can be done.
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
-
Nov 27th, 2008, 03:46 PM
#70
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
Hi guys, thank you for this great thread. I am using Visual Basic 2005.
I have code similar to this and the spell checker is working.
The problem I am having is if the user brings up the spell checker dialog window and then switches to another application and then alt-tabs back to my application, things freeze up.
The user can alt-tab back to the Word dialog box and close it, but if he tries to go directly to the application it freezes.
Does the line: "App.OleRequestPendingTimeout = 999999" prevent this freezing, and if not is there another way to fix this?
Thanks again
-
Nov 27th, 2008, 03:58 PM
#71
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
Didn't realize above message saved, srry for the double post
Last edited by zepar; Nov 28th, 2008 at 07:46 AM.
-
Dec 1st, 2008, 02:42 PM
#72
Re: Advanced VB/Office Guru™ SpellChecker™
No prob and Thanks
Since you are using .NET you should be using something similar to my VB.NET version:
http://www.vbforums.com/showthread.php?t=359879
In .NET perhaps creating a separate thread to process the spellchecking may solve the siiue
I'm working on a new updated version and shold be ready soon
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
-
Dec 8th, 2008, 09:33 AM
#73
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
I tried the code and am still having the freezing issue when the user tabs out to another app and then back to my app while the spellchecker is still running, so I put in a workaround where I will show Word in the task bar below and they can click on that to get back to the spellchecker and avoid freezing.
Thanks again for your help
-
Dec 8th, 2008, 01:17 PM
#74
Re: Advanced VB/Office Guru™ SpellChecker™
No prob.
What version of Word are you using so we can track any issues with a particular version?
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
-
Dec 8th, 2008, 01:19 PM
#75
New Member
Re: Advanced VB/Office Guru™ SpellChecker™
Word 2003 (Word 11.5604.8202)
-
Aug 27th, 2009, 09:57 AM
#76
Hyperactive Member
Re: Advanced VB/Office Guru™ SpellChecker™
Hello,
I tried this code and got this error.
Code:
Error: User defined type not defined.
Public moApp As Word.Application
I copied and pasted your code to a module then
I cut the bottom part and pasted it into a form.
Where did I go wrong?
-
Aug 27th, 2009, 10:23 AM
#77
Re: Advanced VB/Office Guru™ SpellChecker™
Rather than just copy+paste code from somewhere, you should at least read the comments at the top of it:
Code:
'Early binding:
'Add a reference to MS Word xx.0 Object Library
'Modifications: none.
'Late binding:
'No references needed to any version of Word
'Modifications: Change object vars definitions (moApp & oDoc) to Object
'Change constants to their numeric equilivalents.
-
Aug 27th, 2009, 11:56 AM
#78
Re: Advanced VB/Office Guru™ SpellChecker™
You are better off using Late Binding as I remember reading your Word Processor thread.
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
-
Aug 27th, 2009, 05:02 PM
#79
Hyperactive Member
Re: Advanced VB/Office Guru™ SpellChecker™
I did read the notes and still didn't know what it meant.
If I had examples of binding or whatever, it would help. I
could then figure out what does what.
-
Aug 27th, 2009, 06:39 PM
#80
Re: Advanced VB/Office Guru™ SpellChecker™
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
|