[Help] Remove custom toolbar using C#

384
0
04-07-2014 07:03 PM
CaseyChau
New Contributor
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
0 Kudos
0 Replies