Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Word97 work with VB for spellcheck
Message
From
06/09/1998 08:56:37
 
 
To
04/09/1998 17:32:09
Darryl Minsky
Stallion Software Systems Ltd.
Calgary, Alberta, Canada
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00133489
Message ID:
00133649
Views:
12
Hi Darryl,
Perhaps this might help:

1. From the Project menu, click References.
2. To include the Microsoft Word 8.0 Object Library in your project, make sure that there's an "x" in the check box next to its listing, and then click OK.
3. Double-click the Check Spelling button, and then type the following program code in the Code window:
Dim X As Object 'create Word object
Set X = CreateObject("Word.Application")

X.Visible = False 'hide Word
X.Documents.Add 'open a new document
X.Selection.Text = Text5.Text 'copy text box to document
X.ActiveDocument.CheckGrammar 'run spell/grammar checker
Text5.Text = X.Selection.Text 'copy corrected text to VB
X.ActiveDocument.Close SaveChanges:= wdDoNotSaveChanges
X.Application.Quit 'quit Word
Set X = Nothing 'release object variable
I found this in the MIcrosoft Learning Visual Basic 6.0 course.

Hope it helps.

Barry
If at first you don't succeed......SET STEP ON!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform