Q. Word97 spell check dictionary and VB?
Is there any way, in VB, to access the Word97 spell check dictionary?
I just want to be able to check if words exist in the dictionary.
A. Try this...
1.In the event procedure in which you plan to use Automation,
use the Dim statement to create an object variable:
im X As Object'use X as variable name
2. Use the CreateObject function to load an Automation object
into the object variable:
Set X = CreateObject("Word.Application")
3.Use the methods and properties of the Application object in
the event procedure.
'hide Word
X.Visible = False
'open a new document
X.Documents.Add
'copy text box to document
X.Selection.Text = Text1.Text
'run spell/grammar checker
X.ActiveDocument.CheckGrammar
'copy results back Consult the online Visual Basic Help files
'in the Object Browser or the product documentation for the
'proper syntax.
Text1.Text = X.Selection.Text
4.When you’ve finished using the object application, use this program
code to close the document, quit Word, and release the object variable
to conserve memory:
'close
X.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'quit Word
X.Quit
'release object variable
Set X = Nothing
(24-Aug-98 Bob Walsh rlwalsh@capecod.net)
Downloads
In IE right-click and select 'Save Target As...' or in Netscape
right-click and select 'Save Link As...'
View Plain Text
Not Available
Not Available