HI, someone already try use an way to use spell check with ms word, maybe using activex?
i need make spell check in memo , in portuguese-br , someone try this?
thanks
oPro:DES := SpellCheck(oPro:DES)
STATIC FUNCTION SpellCheck(Texto)
LOCAL oWord,oDoc,oTexto
LOCAL cText:=Texto
oWord:=TOleAuto():New( "Word.Application" )
oWord:Visible := .F.
oWord:Documents:Add()
oDoc := oWord:Get("ActiveDocument")
oTexto := oWord:Selection()
oTexto:Text := Texto
oDoc:CheckSpelling()
cText := oTexto:Text
oDoc:Close(0)
oWord:Quit()
oTexto:=NIL
oDoc:=NIL
oWord:=NIL
IF ! EMPTY(cText) // If ctext is empty that means that the process was canceled
Texto := cText
ENDIF
RETURN(Texto)
norberto wrote:HI Armando, very thanks, works very fine... let me ask : if i want know if word is present in computer? maybe an function
TRY
oWORD := CREATEOBJECT( "word.Application" )
CATCH
TRY
oWORD := CREATEOBJECT( "word.Application" )
CATCH
// no word is installed
RETURN NIL
END
END
isWord()
local lSuccess:=.F.
local oWord
TRY
oWord:= createObject("word.Application")
lSuccess:=.T.
CATCH
lSuccess:=.F.
END
return lSuccess
SSCE_CheckCtrlBackgroundRecheckAll( ::oActive:hWnd, SSCE_OPTION, RGB( 254, 1, 1 ) ), ),;
CASE nKey == 32
SSCE_CheckCtrlBackgroundNotify( ::oActive:hWnd, SSCE_OPTION, RGB(254, 1, 1) )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 83 guests