[python-win32] OpenOffice automation

Roach, Mark R. mrroach@uhg.net
08 May 2002 09:08:56 -0500


Has anyone had any luck getting OpenOffice's COM objects working?

this is what I'm getting

Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com
>>> import win32com.client
>>> objServiceManager =
win32com.client.Dispatch("com.sun.star.ServiceManager")
>>> objServiceManager
<COMObject com.sun.star.ServiceManager>
>>> objDesktop =
objServiceManager.createInstance("com.sun.star.frame.Desktop")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: 'NoneType' object is not callable


Am I not translating the instructions to python properly?
http://udk.openoffice.org/common/man/tutorial/office_automation.html

Thanks,

Mark Roach