Results 1 to 3 of 3
  1. #1
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    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.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    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!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    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.

Posting Permissions

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