objet COM et ms Word

bieffe62 at gmail.com bieffe62 at gmail.com
Mon Sep 15 09:33:56 EDT 2008


On 15 Set, 12:04, Pretorien <thomas.hilb... at gmail.com> wrote:
> Bonjour @ tous,
>
> je voudrais gerer des doc Word avec python.
> Y aurai-uil une doc quelque part bien faites ???
>
> Pour le moment je fais :
>
> import win32com.client
>
> word = win32com.client.Dispatch('Word.Application')
>
> en suite j'ouvre VBexpress pour connaitre qu'elle fonction appeler:
> par ex:
>
> Dim wrdApp As Word.Application
>
> Set wrdDoc = wrdApp.Documents.Open("\Exemple.doc")
>
> donc en python cela donnerai word.Documents.Open("toto.doc")
>
> et ainsi de suite ....
>
> Y a t il quelque de bien faits pour python, de manière a ne pas avoir
> a gérer et VB d'un cote pour deviner les fonctions à appeler en
> python.
>
> Merci par avance,
>
> Crdt,
>
> Thomas

(I can read french but not write it, so ...)

I did some simple automatic document generation using the COM
interface of word,
and I found this code snippet of some utility:

http://www.bigbold.com/snippets/posts/show/2037


Ciao
-----
FB



More information about the Python-list mailing list