On 21/07/06, andrew clarke <[EMAIL PROTECTED]> wrote: > A quick Google later, and it seems you need to add the following methods > to the CWordAutomate class: > > def Save(self, sFilename): > self.m_obDoc.SaveAs(sFilename) > > def Quit(self): > self.m_obWord.Quit()
Check out the Visual Basic documentation that comes with Word (I think it's an optional component when you install). That will descibe (in a VBA context) the functions you can call after Dispatching something. Also, pythonwin comes with a utility called makepy.py. If you run this, it will crank through your available COM objects and generate a whole bunch of python code to tell python about what functions are available. Once you've done this, you can (I think) use help() and dir() to find out what functions are available, and what arguments they expect. You can also read through the generated code itself; it's more helpful than you might expect :-) -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor