Hello,
In my application I wnt open open a Word-file and put it on to the screen, so the client can directly input his text into word.
Opening Word is not a problem, but place in on top doesn't work.
Here is a extraction of my code, so you can test is. You have to create a test.doc file in c:\test.
After the window is open, you have to click the window and the word-file will open but..., it is minimized...
Does anyone know the solution to maximize Word
Thanks,
Marc
In my application I wnt open open a Word-file and put it on to the screen, so the client can directly input his text into word.
Opening Word is not a problem, but place in on top doesn't work.
Here is a extraction of my code, so you can test is. You have to create a test.doc file in c:\test.
After the window is open, you have to click the window and the word-file will open but..., it is minimized...
Does anyone know the solution to maximize Word
#INCLUDE "FiveWin.ch"
func test()
local oWnd
DEFINE WINDOW oWnd TITLE 'Click on the window to open word'
ACTIVATE WINDOW oWnd MAXIMIZED ON CLICK openword()
return
func openword()
local oword,oDoc,hWnd
local cFile := 'c:\temp\test.doc'
oWord := TOleAuto():New("Word.Application")
oDoc := oWord:Documents:Open(cFile)
oWord:Visible := .T.
oWord:WindowState := 1
hWnd := FindWindow(0,'test.doc')
if hWnd != nil
BringWindowToTop( hWnd )
endif
returnThanks,
Marc
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite