Visual Basic Explorer
Visual Basic Explorer
 Navigation
 Home


 Coding
 Source Code

 FAQ Center

 VB Tips

 Downloads

 ToolBox

 Tutorials

 VB Games

 VB News

 VB Award

 VB Forums



 Affiliates
 Planet Source Code

 Rent a Coder

 DirectX4VB


 Misc
 Search

 Feedback

 Advertise

 About


Need to hire
a VB coder?

Please support our sponsor:

 Home 
 Site Map 
 Forums 
 News 
 Feedback 

 

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 View Plain Text
Download Demo Project Not Available
View Code Online Not Available





Home | About | What's New | Source Code | FAQ | Tips & Tricks | Downloads | ToolBox | Tutorials | Game Programming | VB Award | Search | VB Forums | Feedback | VBNews | Copyright & Disclaimer | Advertise | Privacy Policy |

Quick searches: Site Search | Advanced Site Search 

Copyright 2002 by Exhedra Solutions, Inc.
By using this site you agree to its terms and conditions
VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc.