[python-win32] a question about word addin , IRibbonExtensibility, GetCustomUI, getImage, IPicture

shuwj shuwj5460 at 163.com
Sat Mar 24 08:24:55 CET 2012


hi,

I'm writing an addin for ms word 2010.  It will show a tab named JJ in
which there are  two buttons. one labels doo, the other labels doo2.
doo2 should be displayed with customization image(edit.png) but don't
show as expected.

debugging  with pythonwin trace collector debugging tool.  there's a
exception as following:
--------------------------------------------
in _GetIDsOfNames_ with '(u'GetImage',)' and '2048'

in _Invoke_ with 1001 2048 1 (<PyIDispatch at 0x07052048 with obj at 0x03D51050>,)
0
0
0
c_void_p(111734808) ddd
pythoncom error: Python error invoking COM method.

TypeError: Objects of type 'c_void_p' can not be converted to a COM VARIANT (but obtaining the buffer() of this object could)
---------------------------------------------

can anybody give me some helps?

Thanks.
-- 
shuwj <shuwj5460 at 163.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edit.png
Type: image/png
Size: 707 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120324/2a57a5b3/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wordaddin-example.py
Type: application/octet-stream
Size: 4815 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120324/2a57a5b3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdiplus.py
Type: application/octet-stream
Size: 2115 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120324/2a57a5b3/attachment-0001.obj>


More information about the python-win32 mailing list