>Allow me to further clarify. I have tried both the miaximize and visible codes before. What it does is the application excel is pulled up visible and maximized as a window but gets pushed to the background now and my VFP program has focus over top of it while the excel iconc appears at the bottom on the win 7 taskbar with the background of the icon colid in color. How do I get it to switch focus to the excel app as it did normally when I ran it in XP?
Try this:
DECLARE INTEGER FindWindow IN WIN32API STRING @lpClassName, STRING @lpWindowName
DECLARE INTEGER BringWindowToTop IN WIN32API INTEGER
DECLARE INTEGER ShowWindow IN WIN32API INTEGER lnHwnd, integer nCmdShow
DECLARE INTEGER IsIconic IN WIN32API INTEGER lnHwnd
lnHWnd = FindWindow(0, "Caption of the WORD window here")
BringWindowToTop(lnHwnd)
ShowWindow(lnHwnd, 3)
IF IsIconic(lnHWnd) <> 0
ShowWindow(lnHWnd,9)
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.