Hi there,
I'm adding a new top level menu from a script:
var cmdBars = Application.CommandBars;
var menuBar = cmdBars.item("Menu bar");
var newTopMenu = menuBar.Controls.Add(5,,8); // Syntax error
newTopMenu.Caption = "&BroadBook";
// add more items here.
How can I make it land after the Windows menu and before the Help menu? When I add 8 as the third param, I get a syntax error. I must not understand the reference docs:
"CommandBarControls_object.Add([intControlType], [variantCmdId], [variantBefore], [variantParam]);"
"variantBefore is a number that indicates the position of the new control in the collection; the new control is inserted before the control at this position. If this argument is omitted, the control is added at the end of the specified command bar. "
Thanks,
David