[Tutor] Activate window

Jeff Shannon jeff@ccvcorp.com
Wed Oct 23 13:58:01 2002


alan.gauld@bt.com wrote:

> However I actually thought the original poster was asking
> how to do it from Python! I think the win32 module and
> visible=1 posted earlier were the correct answers...

I believe that using the visible property of Excel and Word through
win32com will determine whether or not the window is shown or hidden,
but it won't activate the window (make it the foreground window and
give it the focus).  It may be necessary to use Windows Scripting Host
features for that (which are also available through win32com).  Excel
and Word may also have a method to activate themselves, so try
searching through their scripting docs for "Activate".

Jeff Shannon
Technician/Programmer
Credit International