Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to custom accelerators?

Status
Not open for further replies.

CB06

Programmer
Dec 17, 2004
7
FR
Hi!

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.

Thank you for your help.
 
Visual Basic is what you are seeking, I am not a coder so can not provide the code.

It is a menu selection.

rvnguy
"I know everything..I just can't remember it all
 
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)

Someone can help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top