D
David Thielen
Hi;
The following works:
CommandBars bars =
(CommandBars)ThisApplication.GetType().InvokeMember("CommandBars",
System.Reflection.BindingFlags.GetProperty, null, ThisApplication, null);
CommandBarButton cbc =
(CommandBarButton)bars.FindControl(MsoControlType.msoControlButton,
Type.Missing, caption, false);
But I cannot do the following:
CommandBar toolbar = bars.Add("AutoTag", MsoBarPosition.msoBarTop, false,
true);
for (int ind=0; ind<toolItems.Length; ind++)
InitToolbar(ind, toolItems[ind]);
CommandBarButton cbc =
(CommandBarButton)toolbar.FindControl(MsoControlType.msoControlButton,
Type.Missing, caption, false, true);
Any idea why not?
thanks - dave
The following works:
CommandBars bars =
(CommandBars)ThisApplication.GetType().InvokeMember("CommandBars",
System.Reflection.BindingFlags.GetProperty, null, ThisApplication, null);
CommandBarButton cbc =
(CommandBarButton)bars.FindControl(MsoControlType.msoControlButton,
Type.Missing, caption, false);
But I cannot do the following:
CommandBar toolbar = bars.Add("AutoTag", MsoBarPosition.msoBarTop, false,
true);
for (int ind=0; ind<toolItems.Length; ind++)
InitToolbar(ind, toolItems[ind]);
CommandBarButton cbc =
(CommandBarButton)toolbar.FindControl(MsoControlType.msoControlButton,
Type.Missing, caption, false, true);
Any idea why not?
thanks - dave