Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Keyboard shortcut won't stick (Word 2002)

    I have a template with LOTS of code - and about 20 keyboard shortcuts to macros and styles. Most of them are fine - but 3 don't work.

    If I look I see they have (for example) ctrl-shift-c assigned. But that does not work. Further, if I try and assign the same sequence to another macro I get that it is currently assigned to <blank> - not [unassigned] and not the macro I want. Changing Normals hasn't helped. Using a different key sequence hasn't helped. Commenting out the code and uncommenting hasn't helped.

    Any other ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Keyboard shortcut won't stick (Word 2002)

    I assume that you have made absolutely sure that you're looking at keyboard shortcuts in the template? There's a "Save changes in" dropdown in the Customize Keyboard dialog; this should be set to your template.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Re: Keyboard shortcut won't stick (Word 2002)

    Yes - and other shortcuts work - but not these three (which is why I took the code out and put it back in)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Keyboard shortcut won't stick (Word 2002)

    Could you try running the following macro from a document based on the template, after modifying
    - The key code
    - The macro name
    <code>
    Sub AssignCtrlShiftC()
    Dim lngKeyCode As Long
    lngKeyCode = BuildKeyCode(wdKeyControl, wdKeyShift, wdKeyC)
    CustomizationContext = ActiveDocument.AttachedTemplate
    FindKey(lngKeyCode).Clear
    KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, _
    Command:="MyMacro", KeyCode:=lngKeyCode
    End Sub
    </code>
    This code will clear the assignment to Ctrl+Shift+C, then assign the macro MyMacro to this keystroke.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Re: Keyboard shortcut won't stick (Word 2002)

    Thank you for that. I got it to work by using project.module.macro - even though I added the code to the same module.

    Good trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •