[python-win32] If I used AddObject to add an object to a MS Script control where does it go?

Gerard Brunick gbrunick at andrew.cmu.edu
Wed Mar 5 16:44:18 CET 2008

Thanks Mark.  I can't seem to get my hands on the axscript global; 
however, I now
see the objects that I add as globals themselves.  It also appears that 
vanishes if there is an unhandled exception in the code being run in the 
control.  I think this behavior was what was initially confusing to me.

Thanks again for the response,

Mark Hammond wrote:
> There is a magic 'axscript' global, which probably makes the item available.
> Cheers,
> Mark
>> -----Original Message-----
>> From: python-win32-bounces at python.org [mailto:python-win32-
>> bounces at python.org] On Behalf Of Gerard Brunick
>> Sent: Saturday, 1 March 2008 6:24 PM
>> To: python-win32 at python.org
>> Subject: [python-win32] If I used AddObject to add an object to a MS
>> Script control where does it go?
>> I am using the active scripting stuff to run python code from within MS
>> Office VBA code.
>> Supposedly, the AddObject method of the scripting control makes an
>> object visible to the
>> script code; however, I don't see anything show up in the global python
>> namespace when I
>> do this?  In the examples with win32com, there generally seems to be a
>> useful object exposed
>> to the script like "WScript" for the wsh, and I thought that the added
>> object may show up as a
>> member of such an object, but I don't see such anything like this in my
>> global namespace either?
>> A quick search of the list for "AddObject" found one question in 2004
>> with no replies.  Hopefully,
>> I do a little better this time :).
>> Thanks in advance,
>> Gerard
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> http://mail.python.org/mailman/listinfo/python-win32

More information about the python-win32 mailing list