Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Spell check
Message
De
10/02/2008 13:39:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/02/2008 13:16:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01291204
Message ID:
01291212
Vues:
14
>Hi
>How can I run 'word spell check' on text boxes?
>I found something but it's not nature and has problems.
>here is this
oWord=CREATEOBJECT("Word.Application")
>oWord.WindowState=2
>_CLIPTEXT=thisform.edit1.value
>oWord.Documents.Add.Content.Paste
>oWord.ActiveDocument.CheckSpelling()
>oWord.Visible=.F.
>=oWord.ActiveDocument.Select
>cText=oWord.Selection.Text
>cText=LEFT(cText,LEN(cText)-1)
>REPLACE thisform.edit1.value WITH cText
>_CLIPTEXT=""
>oWord.Documents.Close(0)
>oWord.Quit(0)
You could speed it up by instantiating Word only once - actually, there's John Koziol's spell checker class here in downloads, which does this part for you, but there's something better: Craig Boyd's VFP spellchecker which doesn't involve any cross-process communication or any ActiveX, COM etc, it's pure Fox. I've set it up and used it in about 15 minutes.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform