Create a sub menu in existing menu in Excel Shared Add-in

Posted by Sathish on Stack Overflow See other posts from Stack Overflow or by Sathish
Published on 2010-04-22T12:53:32Z Indexed on 2010/05/19 20:50 UTC
Read the original article Hit count: 639

Filed under:
|

Hi

I am developing a Excel shared Add-in which has the menu called Custom which is created using Excel Macros. Now i want to create a submenu under the Custom menu using Csharp Shared Add -in. Iam using the below code for doing this but no help

oStandardBar = oCommandBars["Custom"];
oCmdBarCtrl = oStandardBar.Controls.Add(MsoControlType.msoControlPopup, Type.Missing, Type.Missing, Type.Missing, true);
oCmdBarCtrl.Visible = false;
oCmdBarCtrl.Caption = "Sub Menu1";

But it does not create a submenu, where as if i give "Help" in place of Custom i get the menu created. any work around for this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about vsto