>bringwindowtotop(oWord.Hwnd) fails with an "OLE Error Code 0*80020006: Unknown Name" error.
>
>Regards
>>Thanks for the reply, but that doesn't really help as I can't find a sensible example of bringwindowtotop whereby it can be applied to an already instantiated version of Winword.exe.
>try:
>
Derek, are you Declaring the API function exactly like Peter? You need to keep the case in the declare command, as Peter showed it, later on the case does not matter, but it does in the declare.
DECLARE Long BringWindowToTop In Win32API Long
DECLARE Long bringwindowtotop In Win32API Long
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges