Where is Word?

Guy Lateur guy.lateur at b-b.be
Tue Jun 14 12:33:39 CEST 2005


Thank you very much; I'll check that out shortly.

g




"Tim Golden" <tim.golden at viacom-outdoor.co.uk> schreef in bericht 
news:mailman.431.1118745058.10512.python-list at python.org...
OK, a slightly more intelligent idea in place of my previous
one. You can use win32api.ShellExecute (from the pywin32 extensions)
which is like a beefed-up os.startfile. In particular, it allows
you to pass parameters to the command. So...

<code>
import win32api
win32api.ShellExecute (
  0, # hwnd
  "open", # action; could be "print" etc.
  "winword.exe", # application
  "c:/temp/temp.txt", #params
  ".", # working directory
  1 # show/don't show
)
</code>

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________ 





More information about the Python-list mailing list