macro to go to next text field

L

Lou

Hi, I am creating a form in Word. I know that once I finish entering my text
in a form field that Word does not automatically go to the next text form
field. But is there a macro that anyone knows that will take you to the next
form field when the alloted number of charters have been typed (All of my
text form field lengths will be 1).

Thanks!
 
D

David Shaw

There is no event that detects this in a Forms Field, you can set the
property of form fields to accept a maximum number of characters but it would
not move on when you reach it, to set a property right click over the form
field you wish to amend and choose Properties, in there is a Maximum Length,
if the document is protected then Tab will move to the next form field and
Shift + Tab will take back, you can run a macro on entering or exiting a Form
field but I can't think how this would help you, you could add some help text
in the Form Field Properties to guide you users on what to do.

What you could do is have an entry macro that is specified in the Form field
Propoerties that shows a form, in a VB form you have much more control over
what is entered and you can tell is to type the text and move onto the next
field, typing of text into a form field is not straight forward and requires
altering the Default text when the document is in an unprotected state,
unless anyone else knows a better way, this is a rather code heavy solution
though but a great learning experience.

In Word 2000 upwards you can have a class event that is able to detect
changes to the cursur position, this is only for the brave and I have never
tried it with Form Fields so I don't know for sure it would work, get it
wrong and you can guarantee and unstable Word environment.

Hope this helps
David Shaw
 

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