Python interfacing with COM
Gabriel Genellina
gagsl-py at yahoo.com.ar
Sun Jan 28 21:00:37 EST 2007
At Sunday 28/1/2007 13:41, Viewer T. wrote:
>I am quite a newbie and I am trying to interface with Microsoft Word
>2003 COM with Python. Please what is the name of the COM server for
>Microsoft Word 2003?
Just use Word.Application, will launch the currently installed Word:
py> import win32com.client
py> word = win32com.client.Dispatch("Word.Application")
py> word.Visible = 1
py> word.Documents.Open(FileName=r"c:\any\filename.doc")
<win32com.gen_py.None.Document>
py> word.Quit()
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list