In xp at the end of execution of this program I see word in foreground
In Windows 7 I have to click to bring it in foreground.
Any ideas
King regards
Marco
#include "fivewin.ch"
function Main()
LOCAL oWord, oText
oWord := CreateObject( "Word.Application" )
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