Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make Word97 work with VB for spellcheck
Message
De
06/09/1998 08:56:37
 
 
À
04/09/1998 17:32:09
Darryl Minsky
Stallion Software Systems Ltd.
Calgary, Alberta, Canada
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00133489
Message ID:
00133649
Vues:
13
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform