A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating keyboard shortcut keys and normal.dot



 
 
Thread Tools Display Modes
  #11  
Old May 21st, 2004, 02:30 AM
Charles Kenyon
external usenet poster
 
Posts: n/a
Default Creating keyboard shortcut keys and normal.dot

Did I get around to referring you to:
http://word.mvps.org/FAQs/Customizat...roToHotkey.htm

This works with styles, too.

If you look in help under keyboard shortcuts you can find them all. There
are a lot.
You can also print a list. File Print
Where it says Print what? change "document" to "key assignments"

The following macro will change the key assignments for headings 4-9 to
match those for 1-3.

Sub AttachKeysToHeadings()
'
' AttachKeysToHeadings Macro
' Macro written 5/20/2004 by Charles Kyle Kenyon
' Adds Key bindings for Heading 4-9 styles to active document
'
CustomizationContext = ActiveDocument
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey4, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 4"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey5, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 5"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey6, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 6"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey7, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 7"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey8, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 8"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKey9, wdKeyControl, wdKeyAlt), _
KeyCategory:=wdKeyCategoryStyle, Command:="Heading 9"
End Sub

You would run it in a template you are creating to be a global template.
Then when the template is loaded, it would apply in all documents.

The following macro attaches Alt-H and then a number to the corresponding
headings. I'm not sure if that is what you meant but I can't get a three-key
combination to work where two of the keys are not shift keys.

Sub AttachHtoHeadings()
'
' AttachHtoHeadings Macro
' Macro written 5/20/2004 by Charles Kyle Kenyon
' Adds Key bindings for Heading 1-9 styles to active document
' Press Alt-H and then the number for the style
'
CustomizationContext = ActiveDocument
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey1), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 1"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey2), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 2"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey3), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 3"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey4), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 4"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey5), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 5"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey6), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 6"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey7), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 7"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey8), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 8"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyH, wdKeyAlt), KeyCode2:= _
BuildKeyCode(wdKey9), KeyCategory:=wdKeyCategoryStyle,
Command:="Heading 9"
End Sub


Something similar could be developed with your other shortcuts or you could
use the Customize Keyboard dialog.

Sorry I can't help with the cleanup macro. When you have the document open
from your normal97.dot, check your macro list. Is it there? You can use the
Organizer to move macros as well as styles. And as you may have guessed, you
can assign keyboard shortcuts to macros, too.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Sheila" wrote in message
...
I printed out the move to template article so I could read it and figure

it out.

I was not aware of the build-in keyboard shortcuts. I did the 3 you

listed and it worked fine. What are all the build-in shortcuts. I need a
lot more than that. Some examples Heading up to 9, (a) alpha listing, (1)
numerical listing, 1st bullet, 2nd dash, 3rd diamond, 4th dash, leading,
note TOC, etc. If I can find out what is currently available then maybe I
will not have to rebuild some. I guess there is no difference in
Ctrl-Alt-1 or Alt-H-1 other than learning what keys to press. Is it is a
lot of work to make them Alt-H-1 instead of Ctrl-Alt-1? If so, I'll
memorize again.

I did notice that I do not have the cleanup macro anymore that was used

with 97. I use highlight the document, tools, macro, macros and then in the
list there use to be one called cleanup. I do not see that anymore. How do
I accomplish that?
Thank you so much for helping me with this, I really appreciate it.



  #12  
Old May 21st, 2004, 04:54 AM
Charles Kenyon
external usenet poster
 
Posts: n/a
Default Creating keyboard shortcut keys and normal.dot

One more article for you to look at since you are working so hard on these
styles issues:
http://addbalance.com/usersguide.htm/styles.htm.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Sheila" wrote in message
...
I printed out the move to template article so I could read it and figure

it out.

I was not aware of the build-in keyboard shortcuts. I did the 3 you

listed and it worked fine. What are all the build-in shortcuts. I need a
lot more than that. Some examples Heading up to 9, (a) alpha listing, (1)
numerical listing, 1st bullet, 2nd dash, 3rd diamond, 4th dash, leading,
note TOC, etc. If I can find out what is currently available then maybe I
will not have to rebuild some. I guess there is no difference in
Ctrl-Alt-1 or Alt-H-1 other than learning what keys to press. Is it is a
lot of work to make them Alt-H-1 instead of Ctrl-Alt-1? If so, I'll
memorize again.

I did notice that I do not have the cleanup macro anymore that was used

with 97. I use highlight the document, tools, macro, macros and then in the
list there use to be one called cleanup. I do not see that anymore. How do
I accomplish that?
Thank you so much for helping me with this, I really appreciate it.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.