This code, which worked with previous versions of FWH, does not work anymore:
- Code: Select all Expand view
- #include "FiveWin.ch"
function Main()
local texto := "the bery vest"
msgalert(SpellCheck(Texto))
return nil
/*
* --------------------------------------------------------------------------*
(c) Forum Fivetech
* --------------------------------------------------------------------------*
*/
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)
Texto := cText
ENDIF
RETURN(Texto)
This is the error:
Error occurred at: 01/14/11, 14:59:36
Error description: (DOS Error -2147352570) WINOLE/1009 No exported method: GET
Args:
[ 1] = C ActiveDocument
Stack Calls
===========
Called from: => TOLEAUTO:GET(0)
Called from: test.prg => SPELLCHECK(22)
Called from: test.prg => MAIN(7)
What is wrong?.
Thank you.