Microsoft Office Tutorials and References
In Depth Information
Forms: Suppressing New Paragraphs in Form Fields
When you have finished editing the text, run the 'MoveGraphicToPage' macro
to reposition the graphics.
Forms: Suppressing New Paragraphs in Form Fields
This procedure disables the Enter key when the user is typing in form fields. It
also demonstrates assigning a macro to a keyboard shortcut.
Example file:
Scenario: As a word processing program, Word is primarily
concerned with text flow. The Textinput type of form field
reflects this—by default, as much text as desired can be
typed into the form. The form field wraps like any other text
and displays its content on multiple lines.
While this is appropriate for some applications, forms that
mimic paper forms need to restrict the amount of space a
form field can occupy. Word provides no direct functionality
to accomplish the task; most often, the form fields are placed
in table cells with an exact height and width setting. In some
cases, it may be desirable to prevent the Enter key from
creating a new paragraph in the form field, or the
Shift+Enter key combination from generating a new line.
However, if the form contains unprotected sections where
the user can type and edit freely, these key combinations
should be allowed to work normally in these regions.
This set of macros dynamically changes the two keyboard assignments,
depending on where the selection in the document is located.
View the Appendix to learn how to store this procedure
in a Standard module.
Search JabSto ::

Custom Search