A lot of KeyBindings

P

Peter Faulhaber

Hi All,

I defined a lot of keybindings. Only the first one is working. Any idea?

Sub Toetsen()

CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyT), KeyCategory:= _
wdKeyCategoryMacro, Command:="Invoegen.Tip"

CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyW), KeyCategory:= _
wdKeyCategoryMacro, Command:="Invoegen.Waarschuwing"

CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyI), KeyCategory:= _
wdKeyCategoryMacro, Command:="Invoegen.Visionummer"

CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyH), KeyCategory:= _
wdKeyCategoryMacro, Command:="Invoegen.Helpfunctie"

CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyR), KeyCategory:= _
wdKeyCategoryMacro, Command:="Invoegen.Rapport"

End Sub
 
H

Helmut Weber

Hi Peter,

difficult to test because of localization issues.
For the last of your attempted key bindings,
I get the message, that Word cannot change
the function for the specified key.

All others work, though with English names for random commands,
which should work in any language.

I don't know, what english commands
are the equivalents for yours, Dutch apparently.


--
Gruß

Helmut Weber, MVP WordVBA (US-version)

"red.sys" & chr$(64) & "t-online.de"
Win XP, Office 2003 (US-Versions)
 
P

Peter Faulhaber

Hi Helmut,

The commands are indeed Dutch. After command:= " " are just the macroos for
keybindings.

They macro's are all there. I don't get any failure when compiling or
running this macro. Only the first keybinding is working. The other ones
aren't. When using F8, it is going smoothly no problem at all.

Any idea??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top