>My project uses OLE to open Word.
>
oWord=createobject('Word.Application')
>
>I have an active X control I would like to disable when the 'oWord' reference is created (VARTYPE=[O]) and enabled when it is released (VARTYPE=[X]).
>
>With the drop menus I use
SKIP for VARTYPE(oWord)==[O]
and it will gray the bar. With the OCS control, before it fires, I use a FINDWINDOW() fuction to assure the "Title" of the oWord is not available. But I cannot gray it.
>
>Could - and how - would BINDEVENT() be used to trigger a process when the oWord object moves in and out of scope (from vartype = [O] to [X]).
>
>Thanks
Terry,
Yes, this could be done. Marcia Akins presented this technique in her session "Automation with VFP" in November 2003 in Acron, OH. Since it's her code and materials, I let you ask her directly about showing this technique here in UT.
Seems like this white paper is on Marcia's site
http://www.tightlinecomputers.com/Downloads.htm (Tools & Utilities). See Office Automation article.
If it's not broken, fix it until it is.
My Blog