adding the QueueMarkerEvent handler

J

Johnny

Hi all,

I added an item to the right click menu of a shape with the follwoing code:

uiMenu = uiMenuSet.Menus[0];
uiMenuItem = uiMenu.MenuItems.AddAt(0);

uiMenuItem.Caption = "AddedItem2";
uiMenuItem.AddOnName = "QueueMarkerEvent";
uiMenuItem.AddOnArgs = "rom";

However, I don't know how to add the MarkerEvent handler to the event list.
I tried to use the follow code to do so but I keep getting COM exception
error.

vdc.Document.Application.MarkerEvent += new
Microsoft.Office.Interop.Visio.EApplication_MarkerEventEventHandler(Application_MarkerEvent);

Any help or suggestion will be appreciated. Thanks.
 
Top