Object: BindingTables Collection
Adds a Stroke to the KeyBindings collection.
BindingTables.AddStrokeBinding (ByVal Stroke As String,
ByVal Command As String
ByVal BindType As Variant,
ByVal UserData As Variant) As IKeyBinding
You can overwrite existing Stokes in the application. Refer to the Strokes topic in the application help for more information on Strokes.
A string that Stroke pattern.
A string that contains the menu command, script function, keyin command or key to assign to the Stroke.
A BindType constant that defines the command type—key press, menu command, script function, or keyin command.
(Optional) Reserved for future use.
IKeyBinding. The new KeyBinding Object.
' Get the document BindingTables object
Set docBindingTables = Gui.Bindings("Document")
' Assign Stroke to the “2” key
docBindingTables.AddStrokeBinding "14789", "2", BindKey
' Assign Stroke to menu item “FitBoard”
docBindingTables.AddStrokeBinding "159", "View->FitBoard", BindMenu
' Assign Stroke to a script function
Set bindObj = docBindingTables.AddStrokeBinding( "258", "" ,BindFunction)
bindObj.Target = ScriptEngine
bindObj.ExecuteMethod = "myLaunchDirMethod"
' Assign Stroke to a keyin command
docBindingTables.AddStrokeBinding "951", "run c:\temp\NewUserLayer.vbs",
BindCommand