I would like to custom several Visio accelerators. For example I would like to link a function I've written with Ctrl+c (copy) but I don't know how to do.
I know that's a menu selection but I don't succeed in programming it: delete all default Visio accelerators and create mine...
To delete Visio accelerators I wrote: For i = 0 To accelItemsObj.Count - 1
Set accelItemObj = accelItemsObj.Item(i)
accelItemObj.Delete
Next i
... but it stops at i=45 whereas accelItemsObj.Count=89... I don't understand why...
And to add my (Ctrl+c) accelerator (for copy): Set accelTableObj = UIObj.AccelTables.ItemAtID(visUIObjSetDrawing)
Set accelItemsObj = accelTableObj.AccelItems
Set accelItemObj = accelItemsObj.Add
accelItemObj .key = 99 (99=c in ASCII)
accelItemObj .Control = True
accelItemObj .AddOnName = "myFunction"
ThisDocument.SetCustomMenus UIObj
UIObj.SaveToFile (myFile)
... but it doesn't run myFunction when I do (Ctrl+c)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.