The first part is easy. I will have to think about the second part. To find an opened copy of Word and switch focus to it do the following:
from win32com.client import Dispatch word = Dispatch('Word.Application') wdWindowStateNormal = 0 if len(word.Documents): word.Activate() if word.WindowState != wdWindowStateNormal: word.WindowState = wdWindowStateNormal -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Henry Sent: Wednesday, June 15, 2005 3:21 PM To: python-list@python.org Subject: Finding Word and switch focus to it Does anybody know how to find an opened copy of Word and switch focus to it, wait until Word is closed, before continuing my Python script? I tried to search for the answer from Google and nothing stands out. Running under Windows XP. Thanks, -- John -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list