Results 1 to 10 of 10
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word menus - shortcut keys (OfficeXP SP3)

    Hello

    I've created a custom button File, Save that has custom code. I was wondering how do I place the short keys on the right of the menu, so it looks like the default Word menu with short cut keys?

    Please see attachment.

    thank you
    diana

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

    Re: Word menus - shortcut keys (OfficeXP SP3)

    In the first place, assign a keyboard shortcut to the macro, if you haven't already done so:
    - Select Tools | Customize...
    - Click Keyboard...
    - Select the template you want to store the keyboard shortcut in in the 'Save changes in' dropdown list.
    - Select Macros in the list of Categories on the left.
    - Select your macro in the list on the right.
    - If you already defined a shortcut key, you'll see it in the box below Categories.
    - Click in the 'Press new shortcut key' box.
    - Press the desired shortcut key combination.
    - If it is already used, you'll see "Curently assigned to: ...".
    - If you want to assign the new keyboard shortcut, click Assign.
    - Click Close.

    Activate the Visual Basic Editor (Alt+F11).
    Activate the Immediate window (Ctrl+G).
    Type the following, then press Enter:

    CommandBars("File").Controls("Save With Options").ShortcutText = "..."

    where ... is the custom shortcut key you assigned.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word menus - shortcut keys (OfficeXP SP3)

    Thanks Hans.

    I noticed the same shortcut keys are in several templates. our Normal.dot + other templates eg Letter.dot, Fax.dot.

    I add the shortcut keys to Normal.dot and save.
    When I add the shortcut keys to the other templates.

    If I run a test...I noticed the Normal.dot loses ithe new shortcut keys assigned.

    Is there a way to Globally assign the shortcut keys? Or do I have to assign to each template?

    Many thanks
    diana

    diana

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

    Re: Word menus - shortcut keys (OfficeXP SP3)

    Just to make sure: are you talking about the display of the shortcut keys in the menu, or about the assignment of the shortcut keys?

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word menus - shortcut keys (OfficeXP SP3)

    Apologies Hans

    The 1st post was about displaying the shortcut keys next to the menu items.

    With the later post , I was attempting to assign the shortcut keys to the templates via Customize, Keyboard. I noticed for FileSave and FileSaveAs, the same shortcut keys are assigned to each template. So when I got assign the shortcut keys in Normal.dot -, then assign the shortcut keys in other templates. When I go to test the Normal.dot - my assigned shortcut keys have been cleared.

    There the same shortcut keys for all templates, for:
    FileSave
    Ctrl+S
    Shift+ F12
    Alt+Shift+F2

    FileSaveAs:
    F12

    Is there a reason why the Normal.dot shortcut keys are cleared? Do I have to assign the shortcut keys within each template? as our firm has lots of templates - and Im going to be very very busy [img]/forums/images/smilies/ohmy.gif[/img])

    diana

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

    Re: Word menus - shortcut keys (OfficeXP SP3)

    You should keep track of where you store keyboard shortcuts very carefully. The Customize Keyboard dialog has a 'Save changes in' dropdown list.

    If you want a keyboard shortcut to be available in all templates, you should store it either in Normal.dot or in a global template aka add-in. The disadvantage of storing keyboard shortcuts (or styles or macros or ...) is that Normal.dot is (or should be) the template for personal modifications. Unless you force all users to use the same Normal.dot (which I would find extremely irritating), it is going to be difficult to ensure that each user's Normal.dot contains the same keyboard customizations. I would store all global modifications in a global template, and make this available by putting this template in a shared network folder and pointing each user's Startup path for Word to this folder.

    How all this works out if you use a document management system, I have no idea.

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word menus - shortcut keys (OfficeXP SP3)

    Hans

    Ive placed the shortcut keys in both a Global template and Normal.dot.

    Because the shortcut keys were missing (disappeared) from Normal.dot, we had to force the Normal.dot to be pushed out to all the users (yes its is annoying for the users as they lose their customisations [img]/forums/images/smilies/ohmy.gif[/img])

    We are upgrading our Document Management System, the system has changed the way it interacts from Office from ODMA to COMS. In the new system the shortcut keys no longer called the functions in the previous version. And the shortcut keys had to be reset.

    Many thanks again
    diana

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word menus - shortcut keys (OfficeXP SP3)

    I have applied the shortcut keys to call our custom File, Save and File, SaveAs code to Normal.dot and our global template.

    These new changes have been pushed out to our Test Pilot group and failed.

    I've discoveredwhen Word opens, the shortcut keys are re-assigned to the Document Management System modules HumSave and HumSaveAs. When I remove the shortcut keys from the modules HumSave and HumSaveAs, then my shortcuts assigned to my code reappear, and the shortcut keys then work.

    The document management system have a Word template where these modules reside. However this template is password protected and I can't access the code.

    I was thinking to get around this I might have to write code to program the shortcut keys, check and remove them from the DMS modules and re-assign them to my custom code.

    I've never done this before but can code be written to assign shortcut keys?
    Any code available?

    many thanks diana

  9. #9
    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: Word menus - shortcut keys (OfficeXP SP3)

    Word loads global DOT templates in a particular sequence which might allow you to override the Hummingbird assignments. I believe the sequence is "reverse alphabetical," so that key assignments in template aaaaa.dot will override key assignments in bbbbb.dot. Not sure what happens with COM Add-ins, however. Which code wins?

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

    Re: Word menus - shortcut keys (OfficeXP SP3)

    You can use the KeyBindings object to assign shortcuts in code, but I'd think twice before overriding the DMS functionality.

Posting Permissions

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