[Tutor] Automating MSWord (error if run from command line; no error if ru n within PythonWin)

Ezequiel, Justin j.ezequiel@spitech.com
Fri Mar 21 20:42:01 2003


Thanks Bob!

>>> doc = win32com.client.GetObject(sOldFile)  works for me if I provide 
the entire path name. Otherwise I get a VARIETY of errors depending on the 
value.

I put a call to os.path.abspath() and everything works just fine!

>>>Other interesting things happen with doc: the document opened by GetObject 
is not visible (Word 2000)

For this particular script, I do not want the document visible but
it is always good to know these things in case I do.