Re: [python-win32] filling in field in a Word doc?

2011-07-14 Thread Tim Roberts
Bill Allen wrote: > Oh good! That means I definately come to the right place to ask > about this. I have found a FormFields() method for documents that > seems to be able to access the defined fields by number, > doc.FormFields(1), FormFields(2), etc. I am looking at some Perl > code where a

Re: [python-win32] filling in field in a Word doc?

2011-07-13 Thread Bill Allen
Oh good! That means I definately come to the right place to ask about this. I have found a FormFields() method for documents that seems to be able to access the defined fields by number, doc.FormFields(1), FormFields(2), etc. I am looking at some Perl code where a guy is using the same API.

Re: [python-win32] filling in field in a Word doc?

2011-07-13 Thread Bill Allen
The bookmarks way look very useable. I will have to give that a try when I create one of these from scratch. At the moment, I am looking at having to support a Word document with form fields already in it. Not sure that is the way I would have done it myself, but it is what I have to work wit

Re: [python-win32] filling in field in a Word doc?

2011-07-13 Thread sharpblade
I have been doing a lot of work with Word and pywin32, it is a nightmare (Especially with formatting). If you want to populate pre-defined fields then the easiest way I have found is to create a template document and fill it with bookmarks, then pretty much do this: document.Bookmarks("my_bookmark

Re: [python-win32] filling in field in a Word doc?

2011-07-13 Thread Tim Roberts
Bill Allen wrote: > I have the process for using win32com.client to create and put text > into a Word document. How about filling in fields in an existing > Word document? I am looking for more information on working with MS > Word documents using the Python win32 facilities. We've just been h

[python-win32] filling in field in a Word doc?

2011-07-13 Thread Bill Allen
I have the process for using win32com.client to create and put text into a Word document. How about filling in fields in an existing Word document? I am looking for more information on working with MS Word documents using the Python win32 facilities. Thanks, Bill ___