word spell checker

ajifkins

New Member
I am lookimg for a way to use the MS word spellchecker from within progress. any help would be greatly appreciated

Thanks Tony.
 

bendaluz2

Member
Here's a program I use to do spell checking. Simply pass it the word to check and the resultant checked word will come back.

Code:
DEFINE INPUT PARAMETER c$word AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER c$correction AS CHARACTER NO-UNDO.

DEFINE VARIABLE chWord AS COMPONENT-HANDLE NO-UNDO.

CREATE "Word.Application" chWord.

ASSIGN chWord:VISIBLE = NO.

chWord:DOCUMENTS:ADD().

chWord:DOCUMENTS:ITEM(1):RANGE(0,0):INSERTAFTER(c$word).

chWord:DOCUMENTS:ITEM(1):CHECKSPELLING (?,NO,YES).

chWord:DOCUMENTS:ITEM(1):SELECT.

ASSIGN c$correction = chWord:SELECTION:TEXT
       c$correction = SUBSTRING(c$correction,1,LENGTH(c$correction) - 1).

chWord:QUIT(0).

RELEASE OBJECT chWord.

ajifkins said:
I am lookimg for a way to use the MS word spellchecker from within progress. any help would be greatly appreciated

Thanks Tony.
 
Top