using python to edit a word file?

Gerhard Fiedler gelists at gmail.com
Thu Aug 10 14:59:03 EDT 2006


On 2006-08-10 15:15:34, John Salerno wrote:

> I figured my first step is to install the win32 extension, which I did, 
> but I can't seem to find any documentation for it. A couple of the links 
> on Mark Hammond's site don't seem to work.
> 
> Anyway, all I need to do is search in the Word document for certain 
> strings and either delete them or replace them. Easy enough, if only I 
> knew which function, etc. to use.
> 
> Hope someone can push me in the right direction.

When Word is installed, you have a few COM interfaces to Word. I'm not sure
how to access these with Python (but documentation about using COM with
Python should help you here), and I'm not sure whether what you want is
available (but the Word COM documentation should help you with that).

Gerhard




More information about the Python-list mailing list