Moving menu commands
Has anyone had success adding custom commands to FrameMaker menus and then moving them to different locations on the menu? I can do this with the FDK and FrameScript but I haven't had success with ExtendScript. I am defining a custom command and adding it to the File menu. I want to move it up under the Save As XML command. Here is what I am using:
#target framemaker
var menu, cmd, saveCmd;
// Get the File menu.
menu = app.GetNamedMenu ("FileMenu");
// Create the command and add it to the File menu.
cmd = menu.DefineAndAddCommand (10, "SaveAsPdfQuickCmd", "Save As PDF Quick","");
cmd.EnabledWhen = Constants.FV_ENABLE_NEEDS_DOCP_ONLY;
// Move the command up in the menu.
saveCmd = app.GetNamedCommand ("SaveAsXml");
cmd.PrevMenuItemInMenu = saveCmd;
// must call if script has been run through ESTK, redundant otherwise.
UpdateMenus ();
The custom command gets added to the File menu, but it stays at the bottom of the menu. Any help would be appreciated. Thanks.
-Rick

