Showing results for 
Search instead for 
Do you mean 

Add Main Menu item to ACT! for Windows, with sub items?

Copper Contributor
Posts: 87
Country: USA

Add Main Menu item to ACT! for Windows, with sub items?

I've been able to add the new main menu item, but I also want subitems on that new menu.  using the "standard" AddMenuItem code from the early samples, which I use for all other menu additions, is unsuccessful.
This is my code to add the Main Menu item:
Public Sub AddMenu _
    ( _
        ByVal urn As String, _
        ByVal MenuText As String, _
        Optional ByVal Handler As Act.UI.CommandHandler = Nothing)
    Dim NewMenu As Act.UI.Core.CommandBarButton
    Dim ParentMenu As Act.UI.Core.CommandBar
    'Only one instance should exist, so remove any that are left hanging around
    If (MenuItemExists(urn) = True) Then
    End If
    ParentMenu = ACTAPP.Explorer.CommandBarCollection("Connected Menus")
    NewMenu = New Act.UI.Core.CommandBarButton(MenuText, "", Nothing, "", "",
        Act.UI.Core.CommandBarControl.ItemDisplayStyle.TextOnly, False)
    ACTAPP.RegisterCommand(urn, Nothing, Act.UI.RegisterType.Shell)
End Sub

What am I missing?  I just want it in the mainmenu collection so that I can put menu items under it.
Thanks in advance,

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994