On 13/05/2015 2:32 AM, Diego Vélez Torres wrote:
Set App_Caller = Application.Caller
TheGrap = PythonCom.PlaceGraphic(Param1, Param2, App_Caller)
Meanwhile in the COM code I do something like this:
def PlaceGraphic(self, param1, param2, app_caller):
sheet_obj = app_caller.Worksheet
When I run the code I get the following error message:
'PyIDispatch' object has no attribute 'Worksheet'
Is there anyway to pass a VBA object to a Python COM Server and perform
operations?
You should be able to "wrap" this PyIDispatch by doing
win32com.client.Dispatch(app_caller) - Dispatch() lets you pass in
either a string or a PyIDispatch.
HTH,
Mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32