Re: Finding Word and switch focus to it

2005-06-15 Thread John Henry
I tried the first part and works like a charm. I will read the post you cited. Thanks, -- John -- http://mail.python.org/mailman/listinfo/python-list

RE: Finding Word and switch focus to it

2005-06-15 Thread Hughes, Chad O
Consider reading this post. It highlights how to do what you want: http://mail.python.org/pipermail/python-win32/2002-April/000322.html Chad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Henry Sent: Wednesday, June 15, 2005 3:21 PM To: python-list@

RE: Finding Word and switch focus to it

2005-06-15 Thread Hughes, Chad O
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.WindowSta