Results 1 to 4 of 4

Thread: Removing Menu Commands from ADD-INS tab

  1. #1
    VBAX Regular
    Sep 2018

    Question Removing Menu Commands from ADD-INS tab


    I am in the process of developing a custom toolbar that will hold Auto text entries that I have created. I have many auto text that I have divided up into several main categories with some subcategories. The toolbar has been working great and I am currently in the process of adding the auto text macros to the desired buttons on the toolbar. Here an example of how I have the toolbar (AutoTextToolBar), menu (Sections), submenu (Section A), and buttons (Attach Label Here, Batch Record Training Sheet, and List of Supplements and Deviations) created:

    Sub A_AutoText_ToolBar()
    Dim AutoTextToolBar As CommandBar

    Set Sections = AutoTextToolBar.Controls.Add(msoControlPopup)
    Sections.Caption = "Sections"

    Set SectionA = Sections.Controls.Add(msoControlPopup)
    SectionA.Caption = "Section A"

    Set AttachHere = SectionA.Controls.Add(msoControlButton)
    With AttachHere:
    .Style = Office.MsoButtonStyle.msoButtonCaption
    .Caption = "Attach Label Here"
    .OnAction = "AttachHere"
    End With

    Set TrainingSheet = SectionA.Controls.Add(msoControlButton)
    With TrainingSheet:
    .Style = Office.MsoButtonStyle.msoButtonCaption
    .Caption = "Batch Record Training Sheet"
    .OnAction = "Trainingsheet"
    End With

    Set SuppDev = SectionA.Controls.Add(msoControlButton)
    With SuppDev:
    .Style = Office.MsoButtonStyle.msoButtonCaption
    .Caption = "List of Supplements and Deviations"
    .OnAction = "SuppDev"
    End With

    Everything is showing up and working exactly how I expect it to. Recently when I run the macro, the "custom toolbars" group shows up in the ADD-INS tab of word, along with a group called "Menu Commands". The drop down menus that show up in the Menu Commands group do not show my buttons and seem to show the same menu multiple times. I am wondering if there is a way to disable the menu commands group, or if I have written something that has allowed this add-ins feature to start working.

    My end goal would be to only have my toolbar show up and not the menu commands. I have also attached a photo of what I am seeing on my toolbar.

    Thank you for the help! I am very new to developing macros in word and have been learning on the fly.

    VBAExpress Forum Snip.JPG

  2. #2

  3. #3
    Rather than use the commandbars approach which is a throwback to Office version 2003 and earlier and which may not always be compatible in the future, you need to learn how to modify the ribbon to create your own tabs groups and menus etc. is a good place to start.
    Graham Mayor - MS MVP (Word)
    Visit my web site for more programming tips and ready made processes

  4. #4
    VBAX Regular
    Sep 2018
    Logit and Graham,

    Thank you for your quick responses.

    When I had originally started this project I researched and found that article by gregmaxey. The issue is, I currently do not have access to Custom UI Editor and at this time do not have permission or access to download it onto my company network. Additionally, in my own research, I was not able to find a way to customize the ribbon that would carry over to the 300+ co-workers on site that will be using this template other than using commandbars. I do know that this may not be compatible with newer versions of word, but at this time, that is just a hurdle for a later date.

    That being said, I am just attempting to make the best of what I can do. If there any suggestions on other approaches or on how to get rid of the menu commands group, I am open to try anything that my company computer will allow me access to.

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts