Python interfacing with COM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Viewer T.

    #1

    Python interfacing with COM

    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?

  • Gabriel Genellina

    #2
    Re: Python interfacing with COM

    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.Applicatio n, will launch the currently installed Word:

    pyimport win32com.client
    pyword = win32com.client .Dispatch("Word .Application")
    pyword.Visible = 1
    pyword.Document s.Open(FileName =r"c:\any\filen ame.doc")
    <win32com.gen_p y.None.Document >
    pyword.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!


    Comment

    Working...