Results 1 to 2 of 2
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Melbourne, Australia
    Thanked 0 Times in 0 Posts
    We're upgrading our document management system. An new issue occuring is duplicate Word menus are displaying eg File, Save...Save As

    We have implemented work around code to remove the duplicate menu items.

    However what's occuring is; the duplicate Save menu item is removed and accidentally removing the only save icon on the toolbar.

    the code is accessing the command bar which relates to both menu bar and toolbars.

    heres the code...

    Set oCBB = LocateControl(CommandBars("File"), msoControlButton, "&Save", "DMSAVE", 1)
    If Not oCBB Is Nothing Then
    If oCBB.Visible = True Then
    oCBB.Visible = False
    Logging DBUG & oCBB.Caption & " button hidden", vbQuestion, sPROJ & PERIOD & sMODULE & PERIOD & sPROC
    End If
    End If

    is there anyway code to access just menu items?

    Resetting the Standard toolbar displays the save icon.

    Another solution I may implement is resetting the standard toolbar after the code runs.
    Does code exist to reset toolbars?

    any other solutions I can implement?

    many thanks

    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts
    LocateControl is not a built-in Word VBA procedure, so I don't know what it does.

    You can hide the built-in File | Save menu item as follows:

    CommandBars("File").Controls("Save").Visible = False

    This shouldn't affect the Save button on the Standard toolbar. For the Save As menu item, use

    CommandBars("File").Controls("Save As...").Visible = False

    If you want to reset the Standard toolbar:


Posting Permissions

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