Issue with PythonCOM - Application.Run does not work for Access.Application

"Christoph J. Dorner" <[email protected]>
Newsgroups gmane.comp.python.windows
Organization privat
Message-ID <[email protected]>
Hi there,

I need to call Office / VBA applications form a running Python script.
While calling VBA from Python using Application.Run works with EXCEL, it
does not work with ACCESS. What I do:
I link to the Office application via the win32com.client dispatch
mechanism as usual and I can see the application object in the Python
debugger.
If I do an excelapp.Run('xxx") everything is fine.
If I do an accessapp.Run('xxx") it throws an error -2147352562 which
win32api.FormatMessage states is an issue with the number of parameters.
But that cannot be the case as the UDF has no parameter and I do not
pass any (additional) parameter.
Moreover I simulated this accessapp.Run call from EXCEL in VBA and there
it works.
Moreover, I did a "passthrough" via EXCEL i. e. called a stub in EXCEL
VBA using excelapp.Run in Python which itself calls ACCESS VBA via
Application.Run as well. This works for ACCESS VBA code I cannot call
directly from Python. It even works to create/pass back VBA object
references from ACCESS via EXCEL to Python.

I could not find any information ont hat issue and I wonder if this is
an issue related to pywin32 / PythonCOM ? I was told this is a support
request and not an issue.
Happy to learn if anybody else knows this problem and what to do.

Thanks in advance
Christoph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.