Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Coding ENTER to move to next form field in Word97

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt Fries - 23 Nov 2005 18:33 GMT
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.
Doug Robbins - Word MVP - 23 Nov 2005 18:58 GMT
See the Knowledge Base Article "WD97: How to Code the ENTER Key to Move to
Next Field in Protected Form" at:

http://support.microsoft.com/support/kb/articles/Q187/9/85.ASP

Signature

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

>I have no practical experience with VBA, or even VB, but I hope I will
>sound like I know what I'm talking about.
[quoted text clipped - 30 lines]
> Does anyone have a solution to either of these problems? Thanks for your
> consideration.
Matt Fries - 23 Nov 2005 19:11 GMT
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.

> See the Knowledge Base Article "WD97: How to Code the ENTER Key to Move to
> Next Field in Protected Form" at:
>
> http://support.microsoft.com/support/kb/articles/Q187/9/85.ASP
macropod - 25 Nov 2005 06:55 GMT
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
Matthew Fries - 29 Nov 2005 05:37 GMT
>Hi Matt,
>
[quoted text clipped - 11 lines]
>
>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.
-----------------------------------------------------
Matthew Fries       Minneapolis, MN    USA
freeze@baloneyvisi.com

"Quit eating all my *STUFF*!" - The Tick

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.