Extending product function with VBA > The System Architect object model > Object model classes > Application class > Application class: Methods > InsertMacroItemInMenuEx
  
InsertMacroItemInMenuEx
Creates a menu item on the System Architect menu that refers to an existing macro subroutine. This method is an extension of the InsertMacroItemInMenu method.
Syntax
Application Object.InsertMacroItemInMenuEx MacroName, MacroItemCaption, InMenuTitleCaption[, BeforeMenuItemCaption[, Tag[, bAfterSepartor]]]
Parameters
Application Object
Use: Required
Data type: Object
Any instantiated Application class
MacroName
Use: Required
Data type: String
Any valid macro project
Syntax: "Project Name, Module Name, Subroutine Name()"
MacroItemCaption
Use: Required
Data type: String
Name of macro item that will be inserted in an System Architect menu
InMenuTitleCaption
Use: Required
Data type: String
Name of existing System Architect popup menu where macro item is being placed
BeforeMenuItemCaption
Use: Optional
Data type: String
Name of existing System Architect menu item the macro item is being placed before. If not specified, the macro is placed at the bottom of the popup menu.
Tag
Use: Optional
Data type: String
This allows multiple menu items to have the same name and refer to the same subroutine by giving each menu item a unique tag. When one of the menu items is called, its tag tells the subroutine which part of its code to execute. For example, you can write a macro that creates different Word Reports. Instead of having to write separate subroutines for each type of Word Report, you can write all the code in one subroutine and specify different tags in each menu item that point to different functions within the code.
bAfterSepartor
Use: Optional
DataType: Boolean
Only used when the existing menu item, which you are placing the macro item in front of, has a separator line before it. If entered as True, then the macro item is placed after the separator line. If entered as False or left blank, then the macro item is automatically placed before the separator line.
See also
Application class: Methods