Coding ENTER to move to next form field in Word97

M

Matt Fries

I have no practical experience with VBA, or even VB, but I hope I will
sound like I know what I'm talking about.

I have an Online Form in Word 97. The document is protected, and I have
set length limits on the number of characters and format restrictions in
each of the fields.

When the user presses ENTER in any of the form fields, it adds a
paragraph to my document, and screws up the form layout. I want to
prevent this.

I went to this web page:
http://support.microsoft.com/kb/q187985/
....and I implemented the macros. Great! Now the ENTER key just moves to
the next field... BUT The text that is left behind in my text form field
does not adhere to the format that I set on the field! i.e., I type a
name in all lowercase, press ENTER, and it stays lowercase instead of
being converted to title case.

My guess is that the command that selects the next field in the
EnterkeyMacro does not allow the built-in formatting routine to run when
exiting the form field.

Is there some way to call the built-in formatting function, and have it
run based off of what is set in the text form field properties?

The whole reason for this is just so the user doesn't distort the layout
of the form. I played around with creating the form fields inside the
cells of a table, but I would not figure out how to make the table
immutable. Is there some property hidden in a menu somewhere that does
it? Every time I tried, the form field would insert a line when the user
pressed ENTER, and the table just stretched to accomodate it.

Does anyone have a solution to either of these problems? Thanks for your
consideration.
 
M

Matt Fries

I know. I have already been there.

Please read my whole original message. The macro screws up Word's
ability to format the text form fields.
 
M

macropod

Hi Matt,
The whole reason for this is just so the user doesn't distort the layout
of the form. I played around with creating the form fields inside the
cells of a table, but I would not figure out how to make the table
immutable. Is there some property hidden in a menu somewhere that does
it? Every time I tried, the form field would insert a line when the user
pressed ENTER, and the table just stretched to accomodate it.

With the table, use Table|Table Properties|Options and uncheck
'Automatically resize to fit contents'. Next, click on the 'Row' tab and set
each row's height to the 'exact' value of your choice. You can also use the
other tabs to control column width, overall width, positioning, etc.

Cheers
 
M

Matthew Fries

Hi Matt,


With the table, use Table|Table Properties|Options and uncheck
'Automatically resize to fit contents'. Next, click on the 'Row' tab and set
each row's height to the 'exact' value of your choice. You can also use the
other tabs to control column width, overall width, positioning, etc.

Cheers

OK, That seems to be very intuitive... I want to change the properties
of the table.

Here is the problem: There is no "Table Properties" item in the
"Table" menu. In fact, I can find no "Table Properties" even by
right-clicking on a highlighted table, row, or column.

What dialog am I supposed to be looking for?

Maybe you're thinking of a much newer version of word (Sorry, I'm
still using Word97).
Thanks.


Remove the BALONEY from my email address.
 

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