caseychau

[Help] Remove custom toolbar using C#

Discussion created by caseychau on Apr 7, 2014
Hi all,

I have a custom toolbar in the mxd file that I would like to be delete using c#
(Click the little arrow at the end of the any toolbar -> Customize -> In the 'Toolbar' tab -> New)

I can delete the toolbar manually,
(Click the little arrow at the end of the any toolbar -> Customize -> In the 'Toolbar' tab -> delete)

However, I got hunderd of the similar mxd in hand. I would be better if I can auto delete using addin

I have tried to loop throught itoolbaref item using icategoryfactory but I cant find the toolbar I want.
I can't use commandbars.find method coz I dont have the name or id of the particular toolbar.
(I've tried to use the display name of the toolbar [custom toolbar 1] for commandbars.find, but I cant find that toolbar, I believe that is not the system name of the toolbar)

It would be great if anyone share idea or solution. Many Thanks

Outcomes