[Tutor] Using python to create and save a Ms Word file

2006-07-21 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Everyone, I wasn't entirely satisfied with the Ms Word solution because it requires the program run on Windows and have Office installed. As an alternate solution, I created the program listed below to read a file and create a RTF file format doc

Re: [Tutor] Using python to create and save a Ms Word file

2006-07-21 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for your help on this. Here is the completed code in case anyone is interested. #! C:\Python24\python # # program: mswword.py # Author: Andrew Robert # # Ver Date ProgrammerModification # 1.0 07/20/06 AAR

Re: [Tutor] Using python to create and save a Ms Word file

2006-07-20 Thread John Fouhy
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 th

Re: [Tutor] Using python to create and save a Ms Word file

2006-07-20 Thread andrew clarke
On Thu, Jul 20, 2006 at 01:25:26PM -0400, Andrew Robert wrote: > I have a text file being broadcast on a web site and I would like to download > it > and save it as an MS Word file. ... > I found the following code on the web that comes close to what i need. > > It: > > - - reads a file pass

[Tutor] Using python to create and save a Ms Word file

2006-07-20 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Everyone, I have a text file being broadcast on a web site and I would like to download it and save it as an MS Word file. The download from web is relatively painless. #!C:\Python24\Python import sys from urllib import urlopen if len(sys