Using Macros In Forms

R

rickbrownaz

I am trying to create a macro that will permit use of the ENTER key to
navigate between form fields created in MS Word 2003 instead of the detault
TAB key. I have followed KB articles 212536 and 211219, but nothing seems to
work.

Is there an easier way or am I just missing something?
 
D

Doug Robbins - Word MVP

I believe the information in 211219 is essentially the same as that at:

http://support.microsoft.com/kb/q187985/

which was for Word 97, but I have used in in later versions.

I suspect that there is something not quite right with what you have done.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
R

Rob

This is kind of hackish but it does what you want.

Private Sub Document_New()
CustomizationContext = ActiveDocument
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), KeyCategory:= _
wdKeyCategoryMacro, Command:="SendTab"
End Sub

Sub SendTab()
SendKeys "{TAB}"
End Sub
 
R

rickbrownaz

It seems to work ok on my computer now, but when I save it and e-mail it to a
user it doesn't. I have the macro assigned to the document not the
normal.dot. Is there something else I'm missing?
 
D

Doug Robbins - Word MVP

Quite likely the user has their Macro Security Level set to High in which
case the macros will just be dumped from the doucment without their being
advised. If they set the Level to Medium, they will be given the choice of
allowing or disallowing the macros. You will have to convince them that the
macros are safe.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
R

rickbrownaz

Doug--

That was one of the first things I checked and it was set to high security.
When I lowered it ithe user did receive the prompt to allow macros, but
pressing the enter key continued to enter lines instead of navigating between
input fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top