Add Word menu problem
- From: "Susan Kong" <susan@xxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 09:37:41 +0800
Hi there,
I tried to add customized menu to WORD menu, but I can only add 7 submenu
items to the menu "Mymenu". Anybody knows why?
Here is my code:
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "Mymenu"
Set ctrl1 = newMenu.Controls _
.Add(Type:=msoControlButton, ID:=1)
With ctrl1
..Caption = "HP_Prepare_SRC"
..TooltipText = "HP_Prepare_SRC"
..Style = msoButtonCaption
..OnAction = "HP_Prepare_SRC"
End With
Set ctrl2 = newMenu.Controls _
.Add(Type:=msoControlButton, ID:=2)
With ctrl2
..Caption = "HP_Prepare_HHCHHK"
..TooltipText = "HP_Prepare_HHCHHK"
..Style = msoButtonCaption
..OnAction = "HP_Prepare_HHCHHK"
End With
.......
Thanks!
Best regards
Susan
.
- Follow-Ups:
- Re: Add Word menu problem
- From: Cindy M -WordMVP-
- Re: Add Word menu problem
- Prev by Date: Re: Version of VBA
- Next by Date: Re: Version of VBA
- Previous by thread: Re: Version of VBA
- Next by thread: Re: Add Word menu problem
- Index(es):