Still new to the concept of OLE automation, I have been working with faq184-2555 How do I get a third-party application window toappear inside VFP instead of in the Windows desktop? Kindly shared by wgcs.
I have cut and pasted the following code both in a prg and the Init event of a Form
Each time the program has crashed at the line...
oWrd.height = _screen.height/2
With the err msg...
OLEIDispatch exception code 0 from Microsft Word:'Height is not a reference property..."
I am unclear on what the error message is telling me, and how I resolve this issue.
The Word EXE kicks off fine, but appears in the system tray at the bottom of the Windows desktop.
My environment is VFP 70 SP1 on WinXP. Word is the 2000 version.
TIA - Wayne
I have cut and pasted the following code both in a prg and the Init event of a Form
Code:
* Example use:
oWrd = createobject('word.application')
oWrd.height = _screen.height/2
oWrd.width = _screen.width/2
oWrd.top = _screen.height/8
oWrd.left = _screen.width/8
res = takewindow(oWrd.caption) oWrd.visible = .t.
Each time the program has crashed at the line...
oWrd.height = _screen.height/2
With the err msg...
OLEIDispatch exception code 0 from Microsft Word:'Height is not a reference property..."
I am unclear on what the error message is telling me, and how I resolve this issue.
The Word EXE kicks off fine, but appears in the system tray at the bottom of the Windows desktop.
My environment is VFP 70 SP1 on WinXP. Word is the 2000 version.
TIA - Wayne