kieran martin xqcqghespatialconz tried create really basic word addin based excel example works fine ive pasted code apologies general ignorance ive trolled archives looking something close dice ive luck making excel addins past make way round word object model vba et al im really winging com stuff thanks advance whoever takes look kieran martin espatial ltd new zealand heres trace collector data window display output programs import win32traceutil win32com servers registered debug category object win32trace dispatcher created objectnone onconnection microsoft word 0 simple word addin 2 pythoncom error failed call universal dispatcher traceback recent call last file cpython24libsitepackageswin32comuniversalpy line 177 dispatch retval ob_invokeex_methdispid 0 methinvkind args none none file cpython24libsitepackageswin32comserverpolicypy line 332 _invokeex_ return self_invokeex_dispid lcid wflags args kwargs serviceprovider file cpython24libsitepackageswin32comserverpolicypy line 654 _invokeex_ return designatedwrappolicy_invokeex_ self dispid lcid wflags args kwargs serviceprovider file cpython24libsitepackageswin32comserverpolicypy line 588 _invokeex_ return funcargs file cpython24libsitepackageswin32comdemoswordaddinpy line 62 onconnection print ondisconnection exceptionsnameerror global name apphostapp defined pythoncom error unexpected gateway error traceback recent call last file cpython24libsitepackageswin32comuniversalpy line 177 dispatch retval ob_invokeex_methdispid 0 methinvkind args none none file cpython24libsitepackageswin32comserverpolicypy line 332 _invokeex_ return self_invokeex_dispid lcid wflags args kwargs serviceprovider file cpython24libsitepackageswin32comserverpolicypy line 654 _invokeex_ return designatedwrappolicy_invokeex_ self dispid lcid wflags args kwargs serviceprovider file cpython24libsitepackageswin32comserverpolicypy line 588 _invokeex_ return funcargs file cpython24libsitepackageswin32comdemoswordaddinpy line 62 onconnection print ondisconnection exceptionsnameerror global name apphostapp defined heres code win32com import universal win32comserverexception import comexception win32comclient import gencache dispatchwithevents import winerror import pythoncom win32comclient import constants dispatch import sys support com objects use gencacheensuremodule0002090500000000c000000000000046 0 1 3 bfordemandtrue word 11 gencacheensuremodule2df8d04c5bfa101bbde500aa0044de52 0 2 1 bfordemandtrue office 11 tlb defiining interfaces implement universalregisterinterfacesac0714f23d0411d1ae7d00a0c90f26f4 0 1 0 _idtextensibility2 class buttonevent def onclickself button cancel import win32ui possible necessary use pythonwin gui import win32con win32uimessageboxhello python python testwin32conmb_okcancel return cancel class wordaddin _com_interfaces_ _idtextensibility2 _public_methods_ _reg_clsctx_ pythoncomclsctx_inproc_server _reg_clsid_ c5482ecaf55945a0b078b2036e6f011a _reg_progid_ pythontestwordaddin _reg_policy_spec_ win32comserverpolicyeventhandlerpolicy def __init__self return def onconnectionself application connectmode addin custom print onconnection application connectmode addin custom def ondisconnectionself mode custom print ondisconnection def onaddinsupdateself custom print onaddinsupdate custom def onstartupcompleteself custom print onstartupcomplete custom def onbeginshutdownself custom print onbeginshutdown custom def registeraddinklass import _winreg key _winregcreatekey_winreghkey_current_user softwaremicrosoftofficewordaddins subkey _winregcreatekeykey klass_reg_progid_ _winregsetvalueexsubkey commandlinesafe 0 _winregreg_dword 0 _winregsetvalueexsubkey loadbehavior 0 _winregreg_dword 3 _winregsetvalueexsubkey description 0 _winregreg_sz word addin _winregsetvalueexsubkey friendlyname 0 _winregreg_sz simple word addin def unregisteraddinklass import _winreg try _winregdeletekey_winreghkey_current_user softwaremicrosoftofficewordaddins klass_reg_progid_ except windowserror pass __name__ __main__ import win32comserverregister win32comserverregisterusecommandlinewordaddin unregister sysargv unregisteraddinwordaddin else registeraddinwordaddin _______________________________________________________ kieran martin espatial limited po box 10015 phone 64 4 499 3546 wellington 6143 fax 64 4 499 3547 new zealand cell 64 274 9000 77 wwwespatialconz location based business intelligence thu 07 aug 2008 145058 1300 pythonwin32 creating word addin based excel one