You are here: COM API reference > Client objects > IAMEdmItemsUIMenu interface

IAMEdmItemsUIMenu interface

This interface can be used to invoke commands on a document object.

Remarks

The sample code below demonstrates how to use this interface.

The AMEDMITEMS_VERBS constants define the command that is executed.

Note    These commands are not guaranteed to work correctly when invoked from event handlers or property pages.

(missing or bad snippet)

AMEdmItemsUI object

Example

' This procedure can be used to invoke a built-in command on the EDMUI client library from a UIExtension command.

Public Sub InvokeEDMUICommand( _
    dsg As IAMUIExtensionDesigner, _
    ByVal CurrentObject As Object, _
    ByVal command As AMEDMUI.AMEDMITEMS_VERBS, _
    ByVal hwnd As Long)
    On Error GoTo error_handler
    
    Dim ui As New AMEdmItemsUI
    Dim menu As IAMEdmItemsUIMenu
    Dim pers As IAMEdmItemsUIPersist
    
    Set pers = ui
    pers.Init CurrentObject, 0, dsg.GetHostService(SERVICE_PROVIDER)
    
    Set menu = pers
    menu.InvokeCommand hwnd, command
    
    Set menu = Nothing
    Set pers = Nothing
    Set ui = Nothing
    
    Exit Sub
error_handler:
    MsgBox Err.Description
End Sub

www.bluecieloecm.com