atw: SEC: UNCLASS Re: Word 2003 - shortcut keys for Headings Hijacked

  • From: "Silcock, Howard DR" <Howard.Silcock@xxxxxxxxxxxxxx>
  • To: "Austechwriter (austechwriter@xxxxxxxxxxxxx)" <austechwriter@xxxxxxxxxxxxx>
  • Date: Wed, 15 Jun 2005 15:21:49 +1000

Steve said:

> I am sure I havent answered the real question though - please be more
explicit if so :-) 

Can't speak for the others in the discussion, but this goes a good way
towards amplifying my understanding. I've been checking the VBA Help on
KeyBindings and it looks as if another way that Diana could solve her
problem would be to run a macro something like

Sub AssignKeysToHeadings()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
    wdKeyAlt, wdKeyNumeric1), _
    KeyCategory:=wdKeyCategoryStyle, Command:="Heading 1"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
    wdKeyAlt, wdKeyNumeric2), _
    KeyCategory:=wdKeyCategoryStyle, Command:="Heading 2"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
    wdKeyAlt, wdKeyNumeric3), _
    KeyCategory:=wdKeyCategoryStyle, Command:="Heading 3"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
    wdKeyAlt, wdKeyNumeric4), _
    KeyCategory:=wdKeyCategoryStyle, Command:="Heading 4"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
    wdKeyAlt, wdKeyI), _
    KeyCategory:=wdKeyCategoryStyle, Command:="Image"
End Sub

whenever she wants to use her preferred assignments (or even set it to run
on start-up). This, if I've got it right (not tested), would assign styles
as follows: 

Ctrl-Alt-1   Heading 1
Ctrl-Alt-2   Heading 2
Ctrl-Alt-3   Heading 3
Ctrl-Alt-4   Heading 4
Ctrl-Alt-I   Image

(where "Image" is the name of a user-defined style). The assignments would
be stored in the Normal template, but you could just as well replace 
  CustomizationContext = NormalTemplate 
by 
  CustomizationContext = ActiveDocument.AttachedTemplate 
if you'd prefer to store them in the currently attached template - or you
could presumably use any other template instead.

Howard
**************************************************
To post a message to austechwriter, send the message to 
austechwriter@xxxxxxxxxxxxxx

To subscribe to austechwriter, send a message to 
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with 
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to 
www.freelists.org/archives/austechwriter

To contact the list administrator, send a message to 
austechwriter-admins@xxxxxxxxxxxxx
**************************************************

Other related posts: