Remove items from the Customize menu

Article contributed by Bill Coan

Sub RemoveItemsFromCustomizeMenu()

Dim oCommandBar As CommandBar

On Error Resume Next

For Each oCommandBar In CommandBars
    oCommandBar.Protection = _
            msoBarNoChangeDock + msoBarNoChangeVisible _
            + msoBarNoCustomize + msoBarNoMove + msoBarNoResize
Next oCommandBar

End Sub