win32 com problem

John Machin sjmachin at lexicon.net
Tue Dec 5 06:07:05 EST 2006


Mike P wrote:
> I've got a slight problem when running an excel macro from python using
> the win32.com.client module, in that it says it can't load the DLL file

Does it? All I see is a message that it can't find a macro.

> (it doesn't say which one)

What happens when you run the macro from the Excel UI?

Have you tried using makepy?

>
> and gives me the following error message
>
> Traceback (most recent call last):
>   File "<string>", line 93, in ?

??? It might help if you showed us the code that you are executing.

>   File "<COMObject <unknown>>", line 14, in Run
>   File "C:\Python24\lib\site-packages\win32com\client\dynamic.py", line
> 258, in _ApplyTypes_
>     result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType,
> argTypes) + args)
> pywintypes.com_error: (-2147352567, 'Exception occurred.', (0,
> 'Microsoft Office Excel', "The macro 'CTP.xla!sheet1.CTP' cannot be
> found.", 'C:\\Program Files\\Microsoft
> Office\\OFFICE11\\1033\\xlmain11.chm', 0, -2146827284), None)
> 
> 
> Anybody have any ideas what this means?




More information about the Python-list mailing list