Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

I don't think this is unique to Word 2003 (I noticed the same thing in Word
2000) - but why can't the F1 key be used for a macro instead of to bring up
Help? Does anyone know - or IS there in fact a way to assign F1 to execute
a macro?


Tom

--
remove .spoo to reply by email
  #2   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

I don't think this is unique to Word 2003 (I noticed the same thing in Word
2000) - but why can't the F1 key be used for a macro instead of to bring up
Help? Does anyone know - or IS there in fact a way to assign F1 to execute
a macro?

There is, but it requires a macro. The basic code is as follows. Note the
CustomizationContext: you need to set this to where you want the assignment
to be valid. "TestWord" is the name of the macro.

Application.CustomizationContext = ActiveDocument
Application.KeyBindings.Add wdKeyCategoryMacro, "TestWord", wdKeyF1


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Fri, 22 Sep 2006 11:21:47 +0200, Cindy M.
wrote:

I don't think this is unique to Word 2003 (I noticed the same thing in Word
2000) - but why can't the F1 key be used for a macro instead of to bring up
Help? Does anyone know - or IS there in fact a way to assign F1 to execute
a macro?

There is, but it requires a macro. The basic code is as follows. Note the
CustomizationContext: you need to set this to where you want the assignment
to be valid.


I want the assignment to be globally available to all documents and
templates.

"TestWord" is the name of the macro.

Application.CustomizationContext = ActiveDocument
Application.KeyBindings.Add wdKeyCategoryMacro, "TestWord", wdKeyF1


I opened normal.dot, created a macro called Autoexec, and copied your code
into that macro.

When I ran the autoexec manually, I got the following:

Run-time error 5346
Word cannot change the function of the specified key.


I then closed Word and restarted it. Now every time I open word, I get the
following:

Run-time error 4248
This command is not available because no document is open.

I then created a macro called "TestWord" and copied your code into that
macro. I then ran the macro and got no errors.

I started to record a macro, but Word would still not let me use the F1
key.

Color me confused,


Tom

--
remove .spoo to reply by email
  #4   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

I don't think this is unique to Word 2003 (I noticed the same thing in Word
2000) - but why can't the F1 key be used for a macro instead of to bring up
Help? Does anyone know - or IS there in fact a way to assign F1 to execute
a macro?

There is, but it requires a macro. The basic code is as follows. Note the
CustomizationContext: you need to set this to where you want the assignment
to be valid.


I want the assignment to be globally available to all documents and
templates.

"TestWord" is the name of the macro.

Application.CustomizationContext = ActiveDocument
Application.KeyBindings.Add wdKeyCategoryMacro, "TestWord", wdKeyF1


I opened normal.dot, created a macro called Autoexec, and copied your code
into that macro.

When I ran the autoexec manually, I got the following:

Run-time error 5346
Word cannot change the function of the specified key.


I then closed Word and restarted it. Now every time I open word, I get the
following:

Run-time error 4248
This command is not available because no document is open.

I then created a macro called "TestWord" and copied your code into that
macro. I then ran the macro and got no errors.

I started to record a macro, but Word would still not let me use the F1
key.

Color me confused,

First, you need to create the macro to which you want to assign the keyboard
shortcut. Make sure it's in Normal.dot Then you put that macro name in place of
TestWord.

Replace ActiveDocument with: NormalTemplate

Now make sure the insertion point is blinking in the "Sub" and press F5 to
execute it. You only need to run it the one time. After that, F1 will always
execute the macro (until you loose Normal.dot, anyway).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #5   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Mon, 25 Sep 2006 18:20:05 +0200, Cindy M.
wrote:

Hi Tom,

Color me confused,

First, you need to create the macro to which you want to assign the keyboard
shortcut. Make sure it's in Normal.dot Then you put that macro name in place of
TestWord.



I am a transcriptionist, and clients have different ways of how they want
their transcripts to work.

In general, I want to use F1 to designate either the interviewer in a
one-on-one interview, or the moderator if it's a focus group, so the actual
content of the F1 macro will change from client to client. One client may
want "Q:{tab}", another may want I:{tab}, and so on.

Replace ActiveDocument with: NormalTemplate


You've lost me here. What am I doing and how do I do it?

Please realize that I know virtually nothing about visual basic (which is
what I assume you're talking about here)

Now make sure the insertion point is blinking in the "Sub" and press F5 to
execute it. You only need to run it the one time. After that, F1 will always
execute the macro (until you loose Normal.dot, anyway).


I'm sorry, but I still don't understand you. I'm confused in that I don't
know if you're talking about the macro code you provided in your original
message, or if you're telling me that I have to write the macro that I
actually want to use with the F1 key.

I've tried a few variations on what I *THOUGHT* you were talking about, but
once again I run into the run-time error that tells me the F1 key cannot be
reprogrammed.

This is making me crazy....


Tom

--
remove .spoo to reply by email


  #6   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

I'm sorry, but I still don't understand you.

In that case, I think it would be best if you do NOT try to
reprogram the F1 key. When you poke that deeply into things
that aren't meant to be changed, you have to understand
what you're doing, and how to correct any problems that
might crop up. F1 is dedicated across all Windows apps to
calling up Help, which is why it's locked down so tightly.

There are so many other keyboard combinations available, it
would be best to use one of them, even if, at the moment,
you don't think it will be as "comfortable" to use as F1.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

  #7   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Tue, 26 Sep 2006 18:24:46 +0200, Cindy M.
wrote:

Hi Tom,

I'm sorry, but I still don't understand you.

In that case, I think it would be best if you do NOT try to
reprogram the F1 key. When you poke that deeply into things
that aren't meant to be changed, you have to understand
what you're doing, and how to correct any problems that
might crop up. F1 is dedicated across all Windows apps to
calling up Help, which is why it's locked down so tightly.


After reading your lecture above, and given the presence of "newusers" in
this group's title, I am left wondering why you bothered replying in the
first place. If F1 is locked down so securely, then why not just say "you
can't do that unless you know VBA" and left it at that?

I cheerfully admit that I am not a programmer, but my original question was
a simple one, and if you weren't prepared to provide this "new user" with
meaningful assistance, then why even bother to reply?

Leaving someone with the impression that they're an idiot leaves me
fervently hoping that you are not in HR... :-)


Tom

--
remove .spoo to reply by email
  #8   Report Post  
Posted to microsoft.public.word.newusers
TF TF is offline
external usenet poster
 
Posts: 179
Default Word 2003 - F1 and macros

You are trying to do something that you cannot do. You came here for help
and you have been given EXPERT help in very simple terms. You still cannot
do it. You received $500 consultancy for free and now you are criticising.

I suggest that you apologise for outright effrontery.

--
Terry Farrell - Word MVP
http://word.mvps.org/


"Tom Hall" wrote in message
...
On Tue, 26 Sep 2006 18:24:46 +0200, Cindy M.
wrote:

Hi Tom,

I'm sorry, but I still don't understand you.

In that case, I think it would be best if you do NOT try to
reprogram the F1 key. When you poke that deeply into things
that aren't meant to be changed, you have to understand
what you're doing, and how to correct any problems that
might crop up. F1 is dedicated across all Windows apps to
calling up Help, which is why it's locked down so tightly.


After reading your lecture above, and given the presence of "newusers" in
this group's title, I am left wondering why you bothered replying in the
first place. If F1 is locked down so securely, then why not just say "you
can't do that unless you know VBA" and left it at that?

I cheerfully admit that I am not a programmer, but my original question
was
a simple one, and if you weren't prepared to provide this "new user" with
meaningful assistance, then why even bother to reply?

Leaving someone with the impression that they're an idiot leaves me
fervently hoping that you are not in HR... :-)


Tom

--
remove .spoo to reply by email



  #9   Report Post  
Posted to microsoft.public.word.newusers
aalaan aalaan is offline
external usenet poster
 
Posts: 143
Default Word 2003 - F1 and macros

I think you're being a bit hard here TF. This poster is obviously confused
and distressed and perhaps a few allowances can be made. But I agree with
you that services on the NG from experts like yourself are very valuable to
the user. A darned sight better than the so called 'help' centres in the
Philippines or India!

"TF" terryfarrell%40%6d%73%6e%2ecom wrote in message
...
You are trying to do something that you cannot do. You came here for help
and you have been given EXPERT help in very simple terms. You still cannot
do it. You received $500 consultancy for free and now you are criticising.

I suggest that you apologise for outright effrontery.

--
Terry Farrell - Word MVP
http://word.mvps.org/


"Tom Hall" wrote in message
...
On Tue, 26 Sep 2006 18:24:46 +0200, Cindy M.
wrote:

Hi Tom,

I'm sorry, but I still don't understand you.

In that case, I think it would be best if you do NOT try to
reprogram the F1 key. When you poke that deeply into things
that aren't meant to be changed, you have to understand
what you're doing, and how to correct any problems that
might crop up. F1 is dedicated across all Windows apps to
calling up Help, which is why it's locked down so tightly.


After reading your lecture above, and given the presence of "newusers" in
this group's title, I am left wondering why you bothered replying in the
first place. If F1 is locked down so securely, then why not just say "you
can't do that unless you know VBA" and left it at that?

I cheerfully admit that I am not a programmer, but my original question
was
a simple one, and if you weren't prepared to provide this "new user" with
meaningful assistance, then why even bother to reply?

Leaving someone with the impression that they're an idiot leaves me
fervently hoping that you are not in HR... :-)


Tom

--
remove .spoo to reply by email





  #10   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

After reading your lecture above, and given the presence of "newusers" in
this group's title, I am left wondering why you bothered replying in the
first place. If F1 is locked down so securely, then why not just say "you
can't do that unless you know VBA" and left it at that?

I cheerfully admit that I am not a programmer, but my original question was
a simple one, and if you weren't prepared to provide this "new user" with
meaningful assistance, then why even bother to reply?

Leaving someone with the impression that they're an idiot leaves me
fervently hoping that you are not in HR... :-)

We get all levels of user in this group. From absolute first-time at the
computer keyboard, through first time with Word, all the way to C++ developer
wanting help with code - and every imaginable variation within this spectrum.
It's impossible to evaluate a person's capabilities based on a couple of
short messages :-)

I wasn't implying you're an idiot - but you said yourself that you haven't
the background to understand what I gave you. At that point, I have to make a
judgement call whether I'll potentially be causing more harm by following
through with you to the bitter end (you make the change) with the result that
somewhere down the line your system becomes "unusable".

What you want to do is possible (I tested the code before I posted it here),
but it means doing something the average user isn't supposed to do. And when
you step beyond the "safety boundaries" - whether using code, working on a
construction site, or doing anything else - a basic understanding of what
you're doing and the consequenses and dangers involved is required. Based on
your reaction, I consider it better not to take the chance of wrecking your
installation that could result in the loss of customizations (macros,
keyboard assignments, toolbars) you use in your daily work.

If there weren't any alternatives for solving the problem (executing a macro
with a keyboard shortcut), then I would have continued to work on the problem
with you. But given there are hundreds of possible keyboard combinations, the
risk of causing you damage was too high compared to the gain.

And no, I'm certainly not in HR, nor would I ever care to be. I'm a lousy
nurse / handholder and am quite aware of it :-) My strength is in looking at
problems and seeing possible solutions, with a general disregard of any
emotions or feelings involved.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



  #11   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Thu, 28 Sep 2006 11:55:38 +0200, Cindy M.
wrote:

Hi Tom,


If there weren't any alternatives for solving the problem (executing a macro
with a keyboard shortcut), then I would have continued to work on the problem
with you. But given there are hundreds of possible keyboard combinations, the
risk of causing you damage was too high compared to the gain.


Thank you for the information. You were certainly a lot more forthcoming
than Microsoft when I went to them with this problem. They didn't even
allude to the possibility of doing it at all.

And no, I'm certainly not in HR, nor would I ever care to be. I'm a lousy
nurse / handholder and am quite aware of it :-) My strength is in looking at
problems and seeing possible solutions, with a general disregard of any
emotions or feelings involved.


Then I apologize for my earlier statement. I've implemented a third-party
solution using a program which will cheerfully redefine just about any key
on the keyboard and can be made to act on specific applications only. F1 is
certainly universally recognized as a help function in Windows.

Sorry for ruffling some feathers here, and I'm glad yours weren't among
them. :-)



Tom

--
remove .spoo to reply by email
  #12   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

I've implemented a third-party
solution using a program which will cheerfully redefine just about any

key
on the keyboard and can be made to act on specific applications only.

Glad you've found a solution :-)

Sorry for ruffling some feathers here, and I'm glad yours weren't among
them. :-)

All kinds of people drop in here, some of whom can be very unreasonable.
So the regulars tend to watch out for one another. Terry happens to be a
good friend, as was just trying to protect me :-)

-- Cindy Meister

  #13   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Fri, 29 Sep 2006 13:40:19 +0200, Cindy M.
wrote:

Hi Tom,

I've implemented a third-party
solution using a program which will cheerfully redefine just about any

key
on the keyboard and can be made to act on specific applications only.

Glad you've found a solution :-)


It seems there is no end to the mysteries of Word. Right now I'm trying to
figure out why a macro I just wrote which does nothing but type some
formatted text into a document is triggered with the Shift-F11 key even
when I don't assign the macro to either a key or to a menu. If I add a
hotkey, (e.g. F11), then BOTH F11 and Shift-F11 trigger the macro. If I
delete the macro, Shift-F11 does nothing. If I manually create the macro
from scratch avoiding any key assignment, Shift-F11 will again trigger the
macro. Very strange.



Tom

--
remove .spoo to reply by email
  #14   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Word 2003 - F1 and macros

By default, Shift+F11 is assigned to "Go to the previous field."

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Tom Hall" wrote in message
...
On Fri, 29 Sep 2006 13:40:19 +0200, Cindy M.
wrote:

Hi Tom,

I've implemented a third-party
solution using a program which will cheerfully redefine just about any

key
on the keyboard and can be made to act on specific applications only.

Glad you've found a solution :-)


It seems there is no end to the mysteries of Word. Right now I'm trying to
figure out why a macro I just wrote which does nothing but type some
formatted text into a document is triggered with the Shift-F11 key even
when I don't assign the macro to either a key or to a menu. If I add a
hotkey, (e.g. F11), then BOTH F11 and Shift-F11 trigger the macro. If I
delete the macro, Shift-F11 does nothing. If I manually create the macro
from scratch avoiding any key assignment, Shift-F11 will again trigger the
macro. Very strange.



Tom

--
remove .spoo to reply by email


  #15   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

It seems there is no end to the mysteries of Word. Right now I'm trying to
figure out why a macro I just wrote which does nothing but type some
formatted text into a document is triggered with the Shift-F11 key even
when I don't assign the macro to either a key or to a menu. If I add a
hotkey, (e.g. F11), then BOTH F11 and Shift-F11 trigger the macro. If I
delete the macro, Shift-F11 does nothing. If I manually create the macro
from scratch avoiding any key assignment, Shift-F11 will again trigger the
macro.

Strange, indeed. If you go to Tools/Customize/Keyboard, click in the box for
a new keyboard shortcut, then press Shift+F11 what appears in the empty
space below? "[Unassigned]" or something else (a command name)?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



  #16   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Mon, 02 Oct 2006 11:48:16 +0200, Cindy M.
wrote:

It seems there is no end to the mysteries of Word. Right now I'm trying to
figure out why a macro I just wrote which does nothing but type some
formatted text into a document is triggered with the Shift-F11 key even
when I don't assign the macro to either a key or to a menu. If I add a
hotkey, (e.g. F11), then BOTH F11 and Shift-F11 trigger the macro. If I
delete the macro, Shift-F11 does nothing. If I manually create the macro
from scratch avoiding any key assignment, Shift-F11 will again trigger the
macro.

Strange, indeed. If you go to Tools/Customize/Keyboard, click in the box for
a new keyboard shortcut, then press Shift+F11 what appears in the empty
space below? "[Unassigned]" or something else (a command name)?


It comes up saying "Shift-F11 is assigned to:" and that's all. It doesn't
say unassigned.



Tom

--
remove .spoo to reply by email
  #17   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

It seems there is no end to the mysteries of Word. Right now I'm trying to
figure out why a macro I just wrote which does nothing but type some
formatted text into a document is triggered with the Shift-F11 key even
when I don't assign the macro to either a key or to a menu. If I add a
hotkey, (e.g. F11), then BOTH F11 and Shift-F11 trigger the macro. If I
delete the macro, Shift-F11 does nothing. If I manually create the macro
from scratch avoiding any key assignment, Shift-F11 will again trigger the
macro.

Strange, indeed. If you go to Tools/Customize/Keyboard, click in the box for
a new keyboard shortcut, then press Shift+F11 what appears in the empty
space below? "[Unassigned]" or something else (a command name)?


It comes up saying "Shift-F11 is assigned to:" and that's all. It doesn't
say unassigned.

Oh, yuck sigh I see "PrevField" right above the combobox "Save changes in".
You're sure it's just because your eyes didn't travel far enough to the right
:-)?

If there's really nothing there, you can try the following macro to find out to
what it's been assigned. Note: the macro should have only 18 lines when you've
copied it to the VB Editor (Alt+F11 in Word). If you see more, then it's broken
in the wrong place and we'll need to put humpty-dumpty back together. Only three
lines should start at the far left: Sub, Handler and End Sub

Sub GetKeyboardAssignment()
Application.CustomizationContext = NormalTemplate
On Error GoTo Handler
MsgBox Application.KeyBindings.Key( _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyF11)).Command

Exit Sub

Handler:
Select Case Err.Number
Case 91
MsgBox "The key combination has not been reassigned"
Case Else
MsgBox "Error: " & CStr(Err.Number) & vbCr & _
Err.Description
End Select
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #18   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Tue, 03 Oct 2006 14:34:30 +0200, Cindy M.
wrote:

It comes up saying "Shift-F11 is assigned to:" and that's all. It doesn't
say unassigned.

Oh, yuck sigh I see "PrevField" right above the combobox "Save changes in".
You're sure it's just because your eyes didn't travel far enough to the right
:-)?


Positive. There's nothing there.

If there's really nothing there, you can try the following macro to find out to
what it's been assigned. Note: the macro should have only 18 lines when you've
copied it to the VB Editor (Alt+F11 in Word). If you see more, then it's broken
in the wrong place and we'll need to put humpty-dumpty back together. Only three
lines should start at the far left: Sub, Handler and End Sub

Sub GetKeyboardAssignment()
Application.CustomizationContext = NormalTemplate
On Error GoTo Handler
MsgBox Application.KeyBindings.Key( _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyF11)).Command

Exit Sub

Handler:
Select Case Err.Number
Case 91
MsgBox "The key combination has not been reassigned"
Case Else
MsgBox "Error: " & CStr(Err.Number) & vbCr & _
Err.Description
End Select
End Sub


I get a nice little Microsoft Word dialog box with an OK button - and
nothing else.

And I count only 17 lines in the above macro, including blank lines. :-)



Tom

--
remove .spoo to reply by email
  #19   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

And I count only 17 lines in the above macro, including blank lines.

:-)

SighSenior moments are becoming increasingly frequent. 17, yes. But
at least it ran g

I get a nice little Microsoft Word dialog box with an OK button - and
nothing else.

Hmmm. Confirms what you see in the dialog box. Interesting. See if this
macro (5 lines) works to REMOVE that odd assignment:

Sub RemoveKeyboardAssignment()
Application.CustomizationContext = NormalTemplate
Application.KeyBindings.Key( _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyF11)).Clear
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)

  #20   Report Post  
Posted to microsoft.public.word.newusers
Tom Hall Tom Hall is offline
external usenet poster
 
Posts: 16
Default Word 2003 - F1 and macros

On Wed, 04 Oct 2006 10:21:08 +0200, Cindy M.
wrote:

I get a nice little Microsoft Word dialog box with an OK button - and
nothing else.

Hmmm. Confirms what you see in the dialog box. Interesting. See if this
macro (5 lines) works to REMOVE that odd assignment:

Sub RemoveKeyboardAssignment()
Application.CustomizationContext = NormalTemplate
Application.KeyBindings.Key( _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyF11)).Clear
End Sub


I get "the key combination has not been reassigned"

when I rurn GetKeyboardAssignment now.

I'm a little confused here - what exactly have we proven? That Shift-F11
had some weird procedure associated with it?

I've only recently begun to understand how macros work in Word. I don't
mean the macros themselves, but how they're stored and what macro is
available in what place(s).

All of these assignments I've been playing with I've been storing into
document templates specifically for the client whose work I'm doing at the
time.

If you've ever done transcription, you'll know that there are times when
speakers appear to be talking in some unknown language. When that happens,
I'll put the italicized text "[undecipherable]" into the document, bound to
the F11 key. Some clients want included as well an indication of location
in the file or tape where these unclear passages occur, and for that I use
Shift-F11 to insert the same text, followed by the manual insertion of the
appropriate information (elapsed time into the digital file or counter
position on the trascribing machine). I have no need for these functions in
my own work so I don't store them in Normal.dot.

Since running your RemoveKeyboardAssignment macro, I'm no longer seeing
Shift-F11 execute anything other than what I want, when I want, so the
initial problem that prompted this thread is solved.

I'm still somewhat fuzzy on how Word actually handles macros. I've had
cases where I've recorded a macro bound to a hotkey and had that hotkey do
nothing, but then I could exit and restart Word, and voila! the hotkey now
works.

Getting back to my original question for a moment - I finally figured out
what you were talking about when you provided code for reprogramming the F1
key. Am I correct in assuming that, as written, the macro would have to be
manually executed at the start of each Word session, after having the name
of the macro to be called with the F1 key inserted into the appropriate
line of the code (I called it MakeF1)?

Thanks for your time and your help, Cindy.


Tom

--
remove .spoo to reply by email


  #21   Report Post  
Posted to microsoft.public.word.newusers
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2003 - F1 and macros

Hi Tom,

Hope I catch all your points, below...

I get a nice little Microsoft Word dialog box with an OK button - and
nothing else.

Hmmm. Confirms what you see in the dialog box. Interesting. See if this
macro (5 lines) works to REMOVE that odd assignment:

Sub RemoveKeyboardAssignment()
Application.CustomizationContext = NormalTemplate
Application.KeyBindings.Key( _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyF11)).Clear
End Sub


I get "the key combination has not been reassigned"

when I rurn GetKeyboardAssignment now.

I'm a little confused here - what exactly have we proven? That Shift-F11
had some weird procedure associated with it?

OK, if I'm following correctly: Yesterday we had an assignment with no
discernible name (the message box and dialog box both showed nothing). You
ran the macro, above. Then you tested my first macro again and get the
message the shortcut isn't assigned.

This means that something, at some unknown time, managed to assign the
keyboard shortcut to a command with no name. I've never heard of this
happening and I'd have bet it wasn't possible :-), but I guess I'd have lost
that bet. OR there was some glitch in Word where an assignment was made and
lost at some point. Impossible to know, at this remove. The important thing
is that we were able to remove it.

I've only recently begun to understand how macros work in Word. I don't
mean the macros themselves, but how they're stored and what macro is
available in what place(s).

All of these assignments I've been playing with I've been storing into
document templates specifically for the client whose work I'm doing at the
time.

Understood. I may be repeating something you already know, but:

Word has a hierarchy for toolbar, menu and keyboard assignments. In case of
conflict, the active document has priority and will override what's assigned
in its attached template. Attached template has priority over anything in any
global template. Individual global templates override Normal.dot (among the
global templates, the last to be loaded has priority). So I do find it
unusual that an assignment in Normal.dot (that's the only thing my macros
should have affected) would override your individual templates.

If you've ever done transcription, you'll know that there are times when
speakers appear to be talking in some unknown language.

Once. As part of an administrative job many years ago. To add to the horror
g, it was an international meeting with many languages. You can appreciate,
I'm sure!

When that happens,
I'll put the italicized text "[undecipherable]" into the document, bound to
the F11 key. Some clients want included as well an indication of location
in the file or tape where these unclear passages occur, and for that I use
Shift-F11 to insert the same text, followed by the manual insertion of the
appropriate information (elapsed time into the digital file or counter
position on the trascribing machine). I have no need for these functions in
my own work so I don't store them in Normal.dot.

Since running your RemoveKeyboardAssignment macro, I'm no longer seeing
Shift-F11 execute anything other than what I want, when I want, so the
initial problem that prompted this thread is solved.

Excellent :-)!

I'm still somewhat fuzzy on how Word actually handles macros. I've had
cases where I've recorded a macro bound to a hotkey and had that hotkey do
nothing, but then I could exit and restart Word, and voila! the hotkey now
works.

Count yourself fortunate :-) I had one installation that - for a while -
recognized NO assigned keyboard shortcuts. Then all of a sudden, they were
all back. No idea what was going on and nothing I tried could change it. I've
seen similar complaints maybe once every couple of years, here on the groups.
A total mystery...

Getting back to my original question for a moment - I finally figured out
what you were talking about when you provided code for reprogramming the F1
key. Am I correct in assuming that, as written, the macro would have to be
manually executed at the start of each Word session, after having the name
of the macro to be called with the F1 key inserted into the appropriate
line of the code (I called it MakeF1)?

If you wanted to change the macro assignment, yes, you'd need to run it each
time you need a different macro.

However, I'd tend to go the path of least resistence: Keep all the macros in
one "pot" and just rename the one I need at the moment. Then I wouldn't need
to keep changing the F1 assignment.

The macro could easily be adjusted to change the Normal.dot, or the template
attached to the active file. Whatever would be most appropriate for your
circumstances. Since you say you keep a template for each client, what might
work best for you would be

1. Open the template

2. In the VB Editor, insert a module into the template and put the macro you
need for that template in it.

3. Make sure the template is the active window in Word

4. Run the macro as it stands (substituting the name of the macro as
appropriate for the template).

5. This should save the keyboard shortcut in the template.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM


All times are GMT +1. The time now is 12:45 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"