Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Stopping Enter from being Pressed In a Form.

Stopping Enter from being Pressed In a Form

by Allen Wyatt
(last updated July 2, 2016)

Amy created an electronic form based on a table format so the entries are aligned. She included form fields in both text and number format, adding a maximum field length for each field. This prevents the person filling out the form from entering text beyond the maximum. However, the person can still press Enter and add blank lines to the form and cause it to be "distorted." Amy wonders how she can prevent users from pressing Enter and messing up the layout of her forms.

It is possible to disable the Enter key, but doing so disables it for the entire document, not just for the form. Also, the key would need to be disabled by using a macro. If the user disables macros by default (due to security settings or by explicitly disabling them when opening the document), then the Enter key would not be disabled. Because of these drawbacks, disabling the Enter key may not be the best way to approach this problem.

A better approach would be to modify how you set up your table; the one that contains your form fields. Follow these general steps:

  1. Unprotect your form.
  2. Select the table that contains your form fields.
  3. Right-click the selected table and choose Table Properties from the Context menu. Word displays the Table Properties dialog box.
  4. Make sure the Table tab is displayed.
  5. Click the Options button. Word displays the Table Options dialog box. (See Figure 1.)
  6. Figure 1. The Table Options dialog box.

  7. Make sure the Automatically Resize to Fit Contents check box is cleared.
  8. Click OK.
  9. Display the Row tab.
  10. Make sure the Specify Height check box is selected. (See Figure 2.)
  11. Figure 2. The Row tab of the Table Properties dialog box.

  12. Just to the right of the Specify Height check box, enter the height you want the row to be.
  13. Using the Row Height Is drop-down list, choose Exactly.
  14. Click OK.
  15. Protect your form.

These steps won't stop someone from pressing Enter, but it will stop it from messing up your table format if they do press Enter. And, since the user won't be able to see what they type after pressing Enter, they'll quickly get the idea that they should not press the key.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9443) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Stopping Enter from being Pressed In a Form.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Invalid Names when Opening Workbook

Don't you hate opening a workbook and seeing error messages? If you see a message that some "invalid names" were detected in ...

Discover More

Worksheet Events

You can create macros that are automatically executed whenever certain events occur within a worksheet. This tip details what ...

Discover More

Adding a Macro to a Toolbar

A great way to customize Excel is to add your macros to a toolbar. That way you can run them quickly and easily.

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

MORE WORDTIPS (RIBBON)

Undesired Font in Form Fields

If you get unwanted formatting in your form fields, it could be because of the way you are formatting the line on which the ...

Discover More

Allowing Only Form Field Changes

Word allows you to create forms that other people can use to enter information. One of the last steps normally taken with ...

Discover More

Calculating Form Fields

Form fields allow you to create (you guessed it) forms. Here is a description of how you can force Word to calculate the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share