I find a way to get the state of the two button, use
WindowFromAccessibleObject and AccessibleObjectFromWindow, the returned
control(sign and encrypt button of outlook IsWordEditor == true) is a
IAccessiblePtr. Then my purpose changed to monitor the click event of the
buttons. I guess that Office::ICommandBarButtonEvents should be use for
advise event. But when i call ICommandBarButtonEvents:

ispEventAdvise,
return E_NOINTERFACE. Why?
Office::_CommandBarButton is derived from IAccessible and can be advised, why
my returned IAccessiblePtr couldn't be advised?? TIA.
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200905/1