[python-win32] OpenOffice automation

Mark Hammond mhammond@skippinet.com.au
Thu, 9 May 2002 17:54:50 +1000


> > >>> objDesktop =
> > objServiceManager.createInstance("com.sun.star.frame.Desktop")
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > TypeError: 'NoneType' object is not callable

It appears that the COM object is returning "None" when a *property* called
"createInstance" is requested.  However, "createInstance" is a method, so an
attempt to reference it as a property should fail.

You could confirm this by printing "objServiceManager.createInstance" - try
that in any language - you should find None/Nothing/NULL is returned instead
of an error.

Mark.