[python-win32] Headers and Footers in Word
Tim Golden
mail at timgolden.me.uk
Wed Jun 20 19:34:47 CEST 2007
P-Cubed wrote:
> I've been trying to figure out how to insert data into the header and
> footer objects of a MS Word document. I've read the Word Object Model
> Overview on
> http://msdn2.microsoft.com/en-us/library/kw65a0we(VS.80).aspx
> <http://msdn2.microsoft.com/en-us/library/kw65a0we%28VS.80%29.aspx>
> and have the Hammond's Python Programming on Win32 book. The I've
> tried fiddling with the MSDN code and have been unsuccessful. The book
> doesn't discuss headers and footers. Does anyone know how to do it?
Often the best way to go about Word or Excel automation tasks
is to record a macro in the app itself and then to translate the
resulting VBA code into Python. I don't have a copy of Word
to hand to try this out, but assuming you do you might want
to give that a go.
TJG
More information about the Python-win32
mailing list