F
Frenchy
Hi all,
I'd like to get a specific CommandBarPopup from a commandbar.
Here's the code I use to add a command bar and then to add a CommandBarPopup
to this CommandBar;
oCommandBars =
(CommandBars)applicationObject.GetType().InvokeMember("CommandBars",
BindingFlags.GetProperty , null, applicationObject ,null);
oStandardBar = oCommandBars.Add("Test",
Microsoft.Office.Core.MsoBarPosition.msoBarTop, missing, true);
Menu =
(CommandBarPopup)oStandardBar.Controls.Add(MsoControlType.msoControlPopup,
missing, missing, missing, true);
When I open a second document, I can't modify the CommandBarPopup "Menu", so
I'd like to get this object, but don't know how!?!
I tried this;
Menu =
(CommandBarPopup)appWord.CommandBars["Test"].GetType().InvokeMember("CommandBarPopup", BindingFlags.GetProperty , null, applicationObject ,null);
....Of cource it doesn't work...I didn't specify the name of the
CommandBarPopup...and I don't know how to do?
Help me please,
frenchy
I'd like to get a specific CommandBarPopup from a commandbar.
Here's the code I use to add a command bar and then to add a CommandBarPopup
to this CommandBar;
oCommandBars =
(CommandBars)applicationObject.GetType().InvokeMember("CommandBars",
BindingFlags.GetProperty , null, applicationObject ,null);
oStandardBar = oCommandBars.Add("Test",
Microsoft.Office.Core.MsoBarPosition.msoBarTop, missing, true);
Menu =
(CommandBarPopup)oStandardBar.Controls.Add(MsoControlType.msoControlPopup,
missing, missing, missing, true);
When I open a second document, I can't modify the CommandBarPopup "Menu", so
I'd like to get this object, but don't know how!?!
I tried this;
Menu =
(CommandBarPopup)appWord.CommandBars["Test"].GetType().InvokeMember("CommandBarPopup", BindingFlags.GetProperty , null, applicationObject ,null);
....Of cource it doesn't work...I didn't specify the name of the
CommandBarPopup...and I don't know how to do?
Help me please,
frenchy