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
:-)

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 01:40 PM.

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

About Us

"It's about Microsoft Word"