Enrico,
yes , i know , i use this at the moment.
Only , i have problems , probably because i am working in MDI envirronnement , and it is not clear when word.exe receive focus , it can also be later in the program. Not closing the text editor give also problems.
So , i tryed to use ole , hoping to avoid this problems
- Code: Select all Expand view
function MemoEdit( cText)
LOCAL hWnd
Memowrit("C:\TEMP\efkes.rtf",cText)
Shellexecute(0 ,0 , "C:\TEMP\efkes.rtf" ,0 ,0 , 1)
hWnd := FINDWND( "EFKES.RTF" )
? "Attention , continue only when the text file is corectly closen"
DO WHIL .T.
hWnd := FINDWND( "EFKES.RTF" )
IF !EMPTY( hWnd )
? " rtf-file not closed : " + CRLF + GETWINDOWTEXT( hWnd )
? "The program closes it "
SENDMESSAGE( hWnd, 16 )
//CloseWindow(hWnd)
ELSE
EXIT
END
END
cText := Memoread("C:\TEMP\efkes.rtf" )
After the shellexecute i had to place a msginfo. Working on XP , this give no problems , but at the client , the msginfo appears before the text editor
Has anyone a better solution ?
Frank