Microsoft KB Archive/58912

From BetaArchive Wiki

Using RenameMenu to Hide Option on the Menu Bar in WinWord PSS ID Number: Q58912 Article last modified on 07-14-1994

1.00 1.10 1.10a 2.00 2.00a 2.00a-CD 2.00b 2.00c

WINDOWS

The information in this article applies to:
- Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c

SUMMARY

You cannot remove the default options from the Microsoft Word for Windows menu bar; however, you can rename a menu name (File, Edit, View, and so forth) as a null string or a non-viewable character with a macro using the following syntax:

RenameMenu <MenuNumber>, NewText$

where the “MenuNumber” argument values are the following:

Value Menu Name —– ———

0 File 1 Edit 2 View 3 Insert 4 Format 5 Tools (5 is Utilities in 1.x) 6 Macro 7 Window

MORE INFORMATION

For example, the following macro replaces View on the menu bar with a blank space.

Word for Windows version 2.0

Sub Main RenameMenu 2, " " End Sub

A space is required between quotation marks to prevent the error “Illegal Function Call,” from appearing.

Word for Windows version 1.x

Sub Main RenameMenu 2, "" End Sub

Note: Although you can replace a menu bar name with a blank space, the menu bar screen area that the name occupies remains active and you can still access the drop-down menu for that selection.

Additional reference words: w4wmacro 1.0 1.00 1.1 1.10 1.1a 1.10a 2.0 winword 2.00 menu

=================================================================

Copyright Microsoft Corporation 1994.