Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CommandBarButton Click Event Not Copied When Toolbars customized

Status
Not open for further replies.

DeanWilliams

Programmer
Feb 26, 2003
236
0
0
GB
Hi,

I have created an Outlook COM addin that adds a CommandBarButton to the 'Standard' toolbar to run a custom for.

I declared it as a control WithEvents. The problem is if a user copies or moves the control to another toolbar the Click event no longer fires.

It does not seem possible to disallow customising the menu. Also there are no events to detect when changes are made.

Any help would be appreciated.

Thanks.
:)
 
You could look at OnUpdate event and Protection property of CommandBar object.

combo
 
Thanks for replying so quickly. I thought about that. The thing is I don't want to prevent people from customising the Standard Toolbar just for the sake of one button. The users wouldn't be happy with that. And you cannot apply protection to the button itself.

It also appears that there are no events for a CommandBar object.
 
Sorry for not precise information concerning the OnUpdate event, it is raised by CommandBars collection. It is not very precise and MS recommends it to be used mostly by COM addins.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top