Lock pagination word form

Posted on 2009-04-30
Last Modified: 2012-05-06
I have a word form that I want to post online.  I want people to be able to fill in the txt form fields without creating a new line when they hit enter.  Even when I set number limits on the form field this still doesn't take care of the problem.  I don't want people to be able to create a new line when they hit enter.
Question by:ksilvoso
    LVL 37

    Accepted Solution

    You might want to try using the text boxes found in the VB toolbox rather than on the forms menu.

    LVL 1

    Author Comment

    How does this work?  I can only type in the box by right clicking on it and selecting edit.  Plus it won't wrap the text.
    LVL 19

    Expert Comment

    If you use the ActiveX controls, then you can code trap the keypress and stop the enter key.

    Dawn Bleuel
    Word MVP
    Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
      If KeyCode = 13 Then
        MsgBox "Sorry, you are not allowed to hit the enter " & vbCr & _
          "key while in this field. Type the details and use the " & vbCr & _
          "TAB key to move to the next field."
      End If
    End Sub

    Open in new window

    LVL 37

    Expert Comment

    by:Joanne M. Orzech
    You can also right-click on the control and go to Properties, just change the Multi-Line option to True... it will wrap.
    LVL 19

    Expert Comment

    I just caught part of your question that I missed earlier. To type in the field, protect the document. With your document protected you should be able to tab from field to field.

    Dawn Bleuel
    Word MVP

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
    I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
    The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
    Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now