ZenMenuItem.Item



Item(vPosition As Variant) As ZenMenuItem

Parameters

vPosition As Variant
This parameter can either be a numerical value or a string.
Example: 0,1,2,... or "ID_FIRST", "ID_SECOND",...
ED
avaliable
RT
avaliable

Remarks

This function returns a submenu object via position or name.

Sample:


Sub ItemMenus()

Dim zMenus As ZenMenus  'Parent object
Dim zMenu As ZenMenu	'Child object of ZenMenus
Dim zMenuItem As ZenMenuItem 'Child object of ZenMenu
Dim zMenuItem_1 As ZenMenuItem 'Child object of ZenMenu

Set zMenus = MyWorkspace.ActiveDocument.ZenMenus

'Select a menu
Set zMenu = zMenus.Item(1)
'Select the first menu item in the main menu
Set zMenuItem = zMenu.Item(0)
'Select the first submenu
Set zMenuItem_1 = zMenuItem.Item(0)
Debug.Print "Name = " & zMenuItem_1.Name

End Sub

See Also

ZenMenuItem