Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word
Message
From
01/10/2001 11:24:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: Word
Miscellaneous
Thread ID:
00562584
Message ID:
00562589
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all!
>
>Is someone know if I can use word dictionnary as spell checker in my application? If yes, how?
>
>Thank you.
>
>Louis

Louis,
I'm not sure but probably John Koziol is the original owner of this code :
clear all
use employee

oWord=CREATEOBJECT("Word.Application")     && Open Word
oWord.WindowState=2                        && Minimized
cSource="employee.notes"                   && memo field
cContents=EVAL(cSource)                    && Get contents
_CLIPTEXT=""                               && Clear Clipboard
_CLIPTEXT=cContents                        && Set Clipboard to memo
oWord.Documents.Add.Content.Paste          && Paste into new word doc
oWord.ActiveDocument.CheckSpelling()       && Run spellchecker

** The following line is necessary because spell checking turns on
** the Word window.

oWord.Visible=.F.
oWord.ActiveDocument.Select               && Select all word text
cText=oWord.Selection.Text                 && Put it into a cvar
IF cText # cContents  && If changed
   REPLACE (cSource) WITH cText  && Replace old w/new
ENDIF
_CLIPTEXT=""                               && Clear Clipboard
oWord.Documents.Close(0)                   && Close new doc (no save)
oWord.Quit(0)                              && Close Word (no save)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform