I have this problem
This code works with xHarbour but with Harbour I have this error
Stack Calls
===========
Called from: => WIN_OLEAUTO:INVOKE(0)
#include "fivewin.ch"
function Main()
LOCAL oWord, oText
TRY
oWord := GetActiveObject( "Word.Application" )
CATCH
TRY
oWord := CreateObject( "Word.Application" )
CATCH
Alert( "ERROR! Word not avialable. [" + Ole2TxtError()+ "]" )
RETURN
END
END
oWord:Documents:Add()
oText := oWord:Selection()
oText:Font:Size := 16
oText:Invoke( "TypeText", "Test 1" + CRLF + CRLF )
oText:Font:Size := 8
oText:Invoke( "TypeText", "Test 2" + CRLF+ CRLF )
oText:Font:Size := 12
oText:Invoke( "TypeText", "Test 3" + CRLF+ CRLF )
oWord:Visible := .T.
oWord:WindowState := 1 // Maximize
return nil
Regards Maurizio