Newbie COM query.

Alex Martelli aleaxit at yahoo.com
Sat Sep 9 12:50:09 EDT 2000


"Nemir" <nemir.BLOCK at hotmail.com> wrote in message
news:XEpu5.1385$tj4.15563 at news-server.bigpond.net.au...
    [snip]
> >>> from win32com.client import dispatch

You must mean Dispatch, or this import would fail.

>
> >>> wordApp=Dispatch("Word.Application")
> >>> wordDoc=wordApp.Documents.Add()
> >>> wordDoc.Range(0,0).Select()
>
> traces back with this exception
>
> Attribute Error:;'tuple' object has no attributes 'InvokeTypes'

Not for me: I just tried this very sequence on PythonWin and
it's working.  Windows98, Word97, and ActivePython (the one
that was built on Python 1.6b1 a while ago -- I don't have the
latest one built on Python 2.0b1, yet).

> I think I am using word version 9, if it makes any difference. Any input
would > be greatly appreciated.

Sorry, no idea what 'version 9' means (Word95, Word97, Word2000?).
What Python & win32com levels are you using?  On what Windows
like operating system?  Not sure this wil help, since I do not know
where that message could come from, though...


Alex






More information about the Python-list mailing list