cancel
Showing results for 
Search instead for 
Did you mean: 

How to add my user define form to user menu?

0 Kudos

I need a quick link to my user define form.

How to add my user define form to user menu?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this sample code:

Set oCreationPackage = sboApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)

Set oMenuItem = sboApplication.Menus.Item("43520") '// modules menu

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP

oCreationPackage.UniqueID = 50000

oCreationPackage.String = "NEW MENU FOLDER"

oCreationPackage.Image = App.Path & "\logo.bmp"

oCreationPackage.Enabled = True

oCreationPackage.Position = 15

Set oMenus = oMenuItem.SubMenus

'// Add the menu to the SBO application

oMenus.AddEx oCreationPackage

Set oCreationPackage = sboApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)

Set oMenus = sboApplication.Menus.Item(ID_MENU_AZI).SubMenus '// modules menu

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING

oCreationPackage.UniqueID = 50001

oCreationPackage.String = "NEW MENU ITEM"

oCreationPackage.Enabled = True

'oCreationPackage.Position = 15

oMenus.AddEx oCreationPackage

Hope this helps

Answers (0)