Customizing the FrontPage Explorer

At startup time, FrontPage reads the Windows registry, looking for menu extensibility keys for the Explorer, either for new top level menus or new commands on existing menus.

Adding New Menus

The HKEY_CURRENT_USER\Software\Microsoft\FrontPage\Explorer\Init Menus key has individual string values that specify each custom menu. The string name must be a unique name. Note that this key is independent of the version of FrontPage.

Each string value under Init Menus has the following syntax:

first_version, last_version, menu_bar_num, menu_name, menu_position

ArgumentDescription

first_versionThe number of the earliest version of FrontPage which should add this new top level menu command. Values < 2 are treated as 2 (since this is first version of FrontPage to support custom menus.) Values greater than the current running version of FrontPage tell FrontPage not to create this menu.

last_versionThe number of the last version of FrontPage which should add this new top level menu command. Values less than the current running version of FrontPage tell FrontPage not to create this menu. If omitted, this argument is treated as being higher than the current running version of FrontPage.

menu_bar_numNumber of the built-in menu bar to which you want to add the menu. This field is ignored as there is currently only one set of menus in the Explorer, but the field value should be set to 1 to allow for future expansion..

menu_nameName of the new menu. The menu accelerator is indicated by an ampersand character preceeding the accelerator key, e.g. “&Tools”.

menu_positionPosition of the new menu on the menu bar. This may be the name of the menu before which you want to place the new menu, or a number indicating the menu’s position from the left end of the menu bar (1-based). If the number or name does not exist or the argument is omitted, then the new menu is placed to the right of the Tools menu. When comparing this string against menu names any accelerators present in the menu names are ignored.

Example: menu1 = 2, ,1, &Site, Tools

The separator between elements is always a comma regardless of the international version of FrontPage and/or the system settings for list separator. Whitespace after the commas is optional, but whitespace within a field is significant and is preserved, allowing for spaces in menu item names, for example “Bullets and Numbering”. Commas within a field can be specified by enclosing the field in double quotes.

Adding New Commands

HKEY_CURRENT_USER\Software\Microsoft\FrontPage\Explorer\Init Commands key has individual string values that specify each custom command. The string name must be a unique name. Note that this key is independent of the version of FrontPage.

Each string value has the following syntax:

first_version, last_version, menu_bar_num, menu_name, command_name, command_line, command_position, macro_key, status_text, help_reference

ArgumentDescription

first_versionThe number of the earliest version of FrontPage which should add this new command to the menus. Values < 2 are treated as 2. Values greater than the current running version of FrontPage tell FrontPage not to create this command.

last_versionThe number of the last version of FrontPage which should add this new command to the menus. Values less than the current running version of FrontPage tell FrontPage not to create this command. If omitted, this argument is treated as being higher than the current running version of FrontPage. Combined with first_version, this argument allows you to create addins which are tailored to work only with specific versions of FrontPage.

menu_bar_numNumber of the built-in menu bar to which you want to add the menu. This field is ignored as there is currently only one set of menus in the Explorer, but the field value should be set to 1 to allow for future expansion.

menu_nameName or number (1-based) of the menu on which to insert the new command. If the number or name does not exist or the argument is omitted, then the new command is placed on the Tools menu.

command_nameName of the new command. If a separator is to be added then the command name is a single dash character “-”. If a separator is added then the only remaining argument after command_name that is significant is the command_position argument; the other arguments are ignored. The menu accelerator is indicated by an ampersand character preceeding the accelerator key, e.g. “My &Addin”.

command_lineFully specified file name and path to the executable file that should be run when the user chooses this command in the FrontPage Explorer.

command_positionPosition of the command on the menu. This may be the name of the command before which you want to place the new command, or a 1-based number indicating the command’s position on the menu counting from the top of the menu (separators are counted). If the name or position does not exist or the argument is omitted, the command appears at the end of the menu.

insert_flagDetermines whether to insert the file pointed to by command_line or to execute it. For the Explorer, the command_line is always executed and the value of this field must be 0. In the Editor, see the table below.

status_textMessage to be displayed in the status bar when the command is selected.

help_referenceFilename and topic number for a custom Help topic for the command, separated by an exclamation point. If you have no help topic to refer to, just use 1000, which will launch the top level topic of the FrontPage help file.

Example: command1 = 2,2,1, Site, &View Server Log, c:\utils\logview.exe,, 0, Displays detailed information about the web site from the info in the server log., logview.hlp!103

Example: command2 = 2, 2, 1, Site, &Reset Server Log, c:\utils\logview.exe,,0, “Empties and resets the web site’s server log.”, logview.hlp!104

Example: command3 = 2, 2, 1, Site,-,,Reset Server Log

Command1 adds the View Server Log command to the end of the Site menu. Command2 adds the Reset Server Log command to the end of the Site menu. Command3 adds a separator between the two items, before the Reset Server Log item. The commands will be processed in the order 1, 2, and then 3.

The separator between elements is always a comma regardless of the international version of FrontPage and/or the system settings for list separator. White space after the commas is optional, but white space within a field is significant and is preserved, allowing for spaces in menu item names, for example “Bullets and Numbering”. Commas within a field can be specified by enclosing the field in double quotes (“ ”).

When comparing menu name strings for the command_position and menu_name arguments, accelerators in the menu names are ignored.