• Macro to Unassign Keyboard Assignment

    Author
    Topic
    #473215

    Our doc management system keeps assigning ^K to its own macro in Word 2003. I use ^K for something else. I can edit the key assignment manually, but it doesn’t seem to stick. Is there a method to remove the ^K assignment from this macro when Word starts? I tried recording a macro, but that didn’t work because the commands recorded just killed ^K completely and not just for this macro.

    Thx.

    -Rich.

    Viewing 1 reply thread
    Author
    Replies
    • #1256279

      Rich,

      Here’s some code to assign a key to an existing macro.

      Code:
         With Application
             .MacroOptions _
                macro:="'" & oPgms.Name & "'!NewFY", _
                Description:="Create a file for the New Fiscal Year", _
                ShortcutKey:="N"  '*** This would be Ctrl+Shift+N ***
         End With    'Application
      

      I use this in my VBA Excel projects in the Auto_Open() macro. You’ll need to determine what macro event fires when you open Word and place it there. You may have to fiddle with what event you place it in as it has to be fired after your document management system is loaded.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1256826

      Thanks for the code. After I posted the message I found something in the VBA help for Word that seems to work. It used the .DISABLE method of FindKey (I think), but I switched it to .CLEAR. When I used .DISABLE, ^K didn’t work at all, but if i used .CLEAR, it it just unassigned.

    Viewing 1 reply thread
    Reply To: Macro to Unassign Keyboard Assignment

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: