Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macros - Remove Key Assignments (XP)

    I recently created a macro and assigned Alt+F as the shortcut keystroke for the macro. Later, a user reminded me that that keystroke is used to access Word's File menu. So, I deleted the macro, re-created it and assigned a different keystroke. NOw, Alt+F no longer works to access File, nor does the new key assignment work for the new macro. How do I go about removing key assignments for macros that no longer exist?

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    First of all, you could have had Alt+F to operate a macro AND had Alt,F still open the File menu. When you assign Alt Plus a letter to some command, it doesn't prevent you from typing Alt & then typing F. i.e. to access a menu with a hotkey, you don't have to press & hold the Alt key, just tap it as if you were typing. That should still work now.

    When you deleted the macro, the keyboard assignment should have been removed also. If you go to Tools/Customize/keyboard..., a dialog box opens. If you type in Alt+F in the "press new shortcut key" box, what does it say? It should say unassigned. If not, you need to remove the assignment.

    Also, when you assign a keystroke to a command (or remove one), you have to make sure that it's saved in the right template or document, depending upon where the original macro was stored.
    Hope this helps,

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    For some reason, the Alt+F does not work any more even if I tap the key as you suggest. I checked the key assignment through Customize and it indicates that it's assigned to something, but won't show the specific function to which it's assigned - just comes up blank (not as [unassigned]).

    When I print out key assignments through Print What for my global template , next to Alt+F it reads:
    'The macro named NORMAL.NEWMACROS.INSERTFILEPATH does not exist.'

    As I mentioned before, I realized that I had mistakenly saved the macro to Normal instead of my global, which is why I deleted it from Normal and re-created it in global. Why would the key assignment be nullified completely in global? Maybe I'm missing the obvious?...

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Brussels, Brussel, Belgium
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    I believe that sequence is unassignable.

    what Phil meant was press ALT, then let go of the key - do not hold it - then press F. hth.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    This sounds strange. I would check in my global template & see if Alt+F is assigned. Otherwise, rename normal.dot (with Word closed) to normal.old, restart Word (a new normal.dot will be created), & see if that helps. If so, you can copy any styles, autotext, macros, & toolbars from the normal.old to the new normal.dot.

    In fact, you can try the steps in <post#=197827>post 197827</post#>, although I can't understand why Alt,F (successively) doesn't work). Does the File menu still have the F in File underlined?

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    Hi Pieter:
    Actually, Alt+F should be assignable. I have it assigned to InsertFormField on my system.

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macros - Remove Key Assignments (XP)

    You could try this old macro from (no longer available) <post#=213226>post 213226</post#>:

    Code:
    Sub ClearKeyBinding()
    ' Hardcoded to clear keybinding for the letter A (unshifted)
    Dim kb As KeyBinding
    ' Set context as desired - customize as needed
    CustomizationContext = NormalTemplate
    ' Create object reference to keycode (works with or without
    '  an existing key binding for the command key)
    Set kb = FindKey(BuildKeyCode(wdKeyA))
    If kb.KeyCategory = wdKeyCategoryNil Then
        MsgBox "No such key assignment; no action taken"
    Else
        kb.Clear
        MsgBox "Key assignment cleared"
    End If
    Set kb = Nothing
    End Sub
    You'll need to customize it to your specific key combination.
    Last edited by jscher2000; 2011-03-19 at 16:24. Reason: Fixed [code][/code] tags.

  8. #8
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Brussels, Brussel, Belgium
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    hi Phil,

    ALT+F, yes.

    what i meant was, the sequence of pressing and releasing ALT and then, pressing F is unassignable.

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    Hi Jefferson:
    Does this macro remove all key assignments involving "a" or just Alt+A? Is there a modification that would allow only certain combinations, like Ctrl or Alt+Ctrl?
    Thanks for this info.

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15>. I should have realized that's what you meant. Sorry.

  11. #11
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macros - Remove Key Assignments (XP)

    That was for just a (I can't remember the context). To build a string with a "shift" key, such as Alt+F, it would be:

    Set kb = FindKey(BuildKeyCode(wdKeyAlt, wdKeyF))

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    Thanks, Jefferson.

  13. #13
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros - Remove Key Assignments (XP)

    This works. Thanks.

Posting Permissions

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