Here is the code .
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object,
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst
As Object, custom() As Variant)
Set oApp = Application
Set omenuIsuite =
oApp.CommandBars("Tools").Controls.Add(Type:=msoControlPopup,
Temporary:=True, Before:=1)
omenuIsuite.Caption = "iS&uite"
omenuIsuite.Enabled = True
Set oitemSmartTags = omenuIsuite.Controls.Add( _
Type:=msoControlButton, Temporary:=True, Before:=1)
oitemSmartTags.Caption = "&Smart Tags"
oitemSmartTags.Tag = "ISuite Smart Tags Dialog"
Set oitemConfigure = omenuIsuite.Controls.Add( _
Type:=msoControlButton, Temporary:=True, Before:=1)
oitemConfigure.Caption = "&Configure"
oitemConfigure.Tag = "ISuite Smart Tags Configure"
????
oApp.KeyBindings.Add KeyCategory:=wdKeyCategoryCommand,
Command:="Configure_Dialog", KeyCode:=BuildKeyCode(wdKeyControl, wdKeyAlt,
wdKeyF12)
oApp.KeyBindings.Add KeyCategory:=wdKeyCategoryMacro,
Command:="SmartTag_Dialog", KeyCode:=BuildKeyCode(wdKeyControl, wdKeyAlt,
wdKeyF11)
????
I;m using IDTExtensibility2 and have added WithEvents to the
commandbarbutton
so mycontrols have a corresponsding click sub routine that gets trigerred .
Now i need to assign a shortcut .. How do it use the KeyBindings ?
-Sampath