G
Gerald K
I can't work out how to create a submenu.
I can create a new menuset, and I can add menuitems to it, but how do I add
a 'submenu' (which itself will have a collection of menuitems) to the menuset?
The code and declarations look like:
Dim AUIObject As Visio.UIObject
Dim AMenuset As Visio.MenuSet
Dim AMenu As Visio.Menu
Dim AMenuItem As Visio.MenuItem
Set AMenuset = AUIObject.MenuSets.ItemAtID(visUIObjSetDrawing)
Set AMenu = AMenuset.Menus.Add
AMenu.Caption = "MyNewMenu"
Set AMenuItem = AMenu.MenuItems.Add
AMenuItem.Caption = "MyNewMenuItem"
AMenuItem.AddOnName = "ThisDocument.Test"
I can create a new menuset, and I can add menuitems to it, but how do I add
a 'submenu' (which itself will have a collection of menuitems) to the menuset?
The code and declarations look like:
Dim AUIObject As Visio.UIObject
Dim AMenuset As Visio.MenuSet
Dim AMenu As Visio.Menu
Dim AMenuItem As Visio.MenuItem
Set AMenuset = AUIObject.MenuSets.ItemAtID(visUIObjSetDrawing)
Set AMenu = AMenuset.Menus.Add
AMenu.Caption = "MyNewMenu"
Set AMenuItem = AMenu.MenuItems.Add
AMenuItem.Caption = "MyNewMenuItem"
AMenuItem.AddOnName = "ThisDocument.Test"