This method removes a custom menu item from the HotDocs assembly window menu that was created using the AddUserMenuItem method.
You cannot delete separator bars. HotDocs manages separators internally. When you remove a menu item, HotDocs verifies that the last item in the menu is not a separator. If it is, HotDocs will automatically remove the bar from the menu.
void DeleteUserMenuItem ( int uiHandle )
Parameters | Description |
uiHandle | This is the menu handle that was returned from AddUserMenuItem. |
The following Visual C# example adds a menu item to the Help Menu, then removes it before beginning an assembly:
public class ExampleCode { static void Main() { HotDocs.Application app = new HotDocs.Application(); HotDocs.Assembly asm = new HotDocs.Assembly(); int h_addh; asm.TemplatePath = @"C:\My Documents\HotDocs\Templates\demoempl.docx"; //adds a menu item to the help menu. asm.AddUserMenuItem("Additional Help", HDAIMENU.AI_HELP, out h_addh); //removes the menu item from the help menu. asm.DeleteUserMenuItem(h_addh); asm.Visible = true; app.Assemblies.Add(asm); } }