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

Re: A lot of KeyBindings by Helmut

Helmut
Tue May 30 10:33:08 CDT 2006

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)








Re: A lot of KeyBindings by PeterFaulhaber

PeterFaulhaber
Tue May 30 12:39:01 CDT 2006

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??


"Helmut Weber" wrote:

> 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)
>
>
>
>
>
>
>
>