Using Python to work with MS Word.
Anthony Evershed
anthony.evershed at npl.co.uk
Fri Dec 20 10:43:37 EST 2002
I have to push data (from an Oracle database or similar, accessed by a
Python script, and hard-coded contents of variables in the Python
script) into a document template (.dot file) in Microsoft Word 2000.
As I am trying to keep as much of the transfer operated outside Word
as possible, I need to use the Win32/COM interface features of Python
to:
a. Find the field tags in the template (for my own benefit, I've kept
them to the form ---NameOfField---).
b. Insert (by whatever means, but quite likely using the Paste command
in Word.
Does anyone have any ideas as to how to perform these tasks
(especially the first, about which I have found no documation either
in books or on the net?
Thanks in advance,
Anthony Evershed
More information about the Python-list
mailing list