change bahavoir standard buttons

  • Thread starter Thread starter Alexey Yukhovich
  • Start date Start date
A

Alexey Yukhovich

How change behavoir standard buttons in standard toolbar ?

for sample i woud like change behavoir button 'Send' in Task-message.
 
You can't. Disable the standard button and replace it with your own that
does what you want.
 
While it's true that you cannot capture or override programmatic execution
of commands (i.e. a script calling send on a message object).you can capture
and override the user interface execution of commands (the user pressing the
send button).

To have your add-in called when a UI command is executed, do the following:

* Retrieve the command bar that contains the button the you want to
override.

* Call the command bar's Find method. It will return a command button
object.

* Setup and event sink with the command button.

* When your event sink method is called be sure to set the cancelled
parameter to true

This works for standard buttons. I haven't been able to get this to work
with the drop-down buttons (i.e. new mail item button).
 
Back
Top