> Tools/Customise.../Keyboard...
>
[quoted text clipped - 10 lines]
> >
> > Thank you.
Hello Jason,
Lookup the "Keybindings" object in Help. The example below is adapted from
that and seems to works ok.
Best regards
John
Sub Key()
'This example assigns the CTRL+SHIFT+B key
'combination to another procedure command
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
wdKeyShift, wdKeyB), KeyCategory:=wdKeyCategoryCommand, _
Command:="MyFoundProcedure"
End Sub
Sub MyFoundProcedure()
MsgBox ("Found")
End Sub
> Is there any VBA code that will do this? I would like to export a VBA
> file
[quoted text clipped - 21 lines]
>> >
>> > Thank you.
Jason - 17 Apr 2006 16:37 GMT
Thanks, John. I guess that I should have stated that I already tried this.
Here is a copy of the code that I am using (this is in Word 97 if that
matters):
Sub LHAssignKey()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF11), _
KeyCategory:=wdKeyCategoryCommand, Command:="LetterHead"
End Sub
Sub LetterHead()
With ActiveDocument.PageSetup
.LeftMargin = Application.InchesToPoints(1)
.RightMargin = Application.InchesToPoints(1)
.TopMargin = Application.InchesToPoints(1.25)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderDistance = Application.InchesToPoints(0.25)
.FooterDistance = Application.InchesToPoints(0.25)
.DifferentFirstPageHeaderFooter = True
.SectionStart = wdSectionNewPage
End With
ActiveDocument.Sections(1).Headers_
(wdHeaderFooterFirstPage).Shapes.AddPicture _
("N:\Provider Audit\Templates\MISC\ugsheader.jpg")
ActiveDocument.Sections(1).Footers_
(wdHeaderFooterFirstPage).Shapes.AddPicture _
("N:\Provider Audit\Templates\MISC\ugsfooter.jpg")
If ActiveDocument.Range.Font.Size > 10 Then
Else
Selection.WholeStory
ActiveDocument.Range.Font.Size = 11
Selection.HomeKey Unit:=wdStory
End If
End Sub
> Hello Jason,
>
[quoted text clipped - 42 lines]
> >> >
> >> > Thank you.
Charles Kenyon - 18 Apr 2006 00:53 GMT
Didn't read the first post. Generally you do _not_ want normal.dot to be
your customization context. It makes your procedure look and feel a lot like
a virus to most users.

Signature
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://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.
> Thanks, John. I guess that I should have stated that I already tried
> this.
[quoted text clipped - 80 lines]
>> >> >
>> >> > Thank you.
Jason - 18 Apr 2006 12:16 GMT
Ok, well, even if I remove that line of code, it does not work. Any other
suggestions?
Thanks,
Jason
> Didn't read the first post. Generally you do _not_ want normal.dot to be
> your customization context. It makes your procedure look and feel a lot like
[quoted text clipped - 83 lines]
> >> >> >
> >> >> > Thank you.
Charles Kenyon - 18 Apr 2006 15:17 GMT
Removing that line from your code leaves normal.dot, the default, as your
customization context.
This, though, is not the problem you wrote about and I have no advice on
that.

Signature
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://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.
> Ok, well, even if I remove that line of code, it does not work. Any other
> suggestions?
[quoted text clipped - 93 lines]
>> >> >> >
>> >> >> > Thank you.