• submenus (XP SP-1)

    Author
    Topic
    #383013

    I am trying to put a menu item captioned

    Viewing 0 reply threads
    Author
    Replies
    • #651543

      You need to create a menu, then drag the items to it:

      Select Tools/Customize… or right-click a toolbar and select Customize…
      In the Customize dialog, activate the Commands tab.
      Scroll the Categories list all the way down. The last item should be New Menu.
      When you select this, there is only one item in the Commands list, also named New Menu.
      Drag this to the menu bar, then click it. A small empty square will appear.
      Now, you can drag items form the Macros category (or the buttons you already put on the main menu) to this new menu.

      • #651684

        Thank Hans, works like a charm.
        I searched through MS’s help, nothing. I even tried to build it through code. Yet all MS needed was clear concise instructions like yours. Wouldn’t it be great if MS’s help was actually helpful, instead of being so extremely obtuse?
        Thanks again.

        • #651699

          That Hans, he’s always there when you need him. Me, on the other hand,
          I’m hard to find. Good show, Hans.

          Hans would have shown you how to do it with a macro, too, but you posted
          in the Word fourm and, well, protocol, you know.

          But here’s some code anyway: (If you pass this sub a commandbar, like, say,
          “Menu Bar”, then it’ll create a new menu item, a “popup” sub item and a few sub items under that.
          The code that executes when a button is clicked is referenced in the Onaction
          property of each AppPopupMenu control.)

          Sub Test
          BuildAppMenu commandbar(“Menu Bar”)
          End Sub

          Sub BuildAppMenu(cBar As CommandBar)
          Dim AppPopupMenu As CommandBarControl
          Dim MenuPopUp As CommandBarPopup
          Dim MenuButton As CommandBarButton
          Dim MenuControl As CommandBarControl

          Set AppPopupMenu = cBar.Controls.Add(Type:=msoControlPopup, Before:=cBar.Controls(“Help”).Index, Temporary:=True)
          With AppPopupMenu
          .Caption = “Your New Menul”
          .TooltipText = “Some tooltip text.”
          .OLEUsage = msoControlOLEUsageNeither
          End With

          ‘ ‘Document Tools
          Set MenuPopUp = AppPopupMenu.Controls.Add(Type:=msoControlPopup, ID:=1, Temporary:=True)
          With MenuPopUp
          .BeginGroup = True
          .Caption = “Document Tools”
          .TooltipText = “Document-Related Utilities”
          .DescriptionText = “Document-Related Utilities”

          Set MenuButton = .Controls.Add(Type:=msoControlButton, Temporary:=True)
          With MenuButton
          .Caption = “Print File List…”
          .TooltipText = “Print a list of files in a selected folder.”
          .FaceId = 1750
          .Tag = .Caption
          .OnAction = “PrintFileList”
          End With

          Set MenuButton = .Controls.Add(Type:=msoControlButton, Temporary:=True)
          With MenuButton
          .Caption = “Designate a Printer…”
          .TooltipText = “Pick a printer destination to which this document will always print.”
          .FaceId = 364
          .Tag = .Caption
          .OnAction = “LaunchCommandBarSub”
          End With

          Set MenuButton = .Controls.Add(Type:=msoControlButton, Temporary:=True)
          With MenuButton
          .Caption = “Document Variables…”
          .TooltipText = “Manage Document Variables”
          .FaceId = 487
          .Tag = .Caption
          .OnAction = “LaunchCommandBarSub”
          End With

          Set MenuButton = .Controls.Add(Type:=msoControlButton, Temporary:=True)
          With MenuButton
          .Caption = “Update Footnotes”
          .TooltipText = “Format footnotes to PERB standards”
          .FaceId = 3365
          .Tag = .Caption
          .OnAction = “LaunchCommandBarSub”
          End With

          End With ‘Document Tools”

          Set MenuPopUp = Nothing
          Set MenuButton = Nothing
          Set AppPopupMenu = Nothing
          End Sub

    Viewing 0 reply threads
    Reply To: submenus (XP SP-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: