Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2004
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text Form Field (Word 2003)

    See attachment.

    I'm creating a form in Word. I added a Text form field and want to lock the form. Also, when I start typing, type on the line. It seems to work but when I get to the end of the first line it adds another line instead of automatically start typing on the next line already in the form. How do I fix that. The form field is Maximum length is set to unlimited. Show me the steps please, thanks in advance.
    Attached Files Attached Files

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Form Field (Word 2003)

    Hi there! Possibly some of the gurus out there will have a better answer for you <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> but I can only see 3 ways to accomplish this. Before I get to that list though, I would suggest using double-space for this portion instead of two line-feeds. I've attached your document modified to show the following options:
    1. <LI>You can place separate codes at the beginning of each line -- not the most elegant, and cumbersome for your target users;
      <LI>You can place it in a single cell table which is the required height, but you'll lose whatever lines they don't use; or
      <LI>Place a table in a frame positioned behind text. However, there's nothing in your field to preven them from spilling over beyond the frame.
    Good luck!
    Attached Files Attached Files
    Karen

  3. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Form Field (Word 2003)

    If you start typing in a FormField and reach the end of a line, it's continued on the next line, moving all subsequent lines down. So it's normally not possible to force Word to continue on "the next line already in the form". If you want to limit the length of the entered text to 3 lines max, you could use Karen's second option and throw in 2 macro's. The first is executed when you enter the FormField and the other when you exit that FormField:

    <pre>Public lngVertPos As Long</pre>

    <pre>Sub EnterFF()
    lngVertPos = Selection.Information(wdVerticalPositionRelativeTo Page)
    End Sub</pre>

    <pre>Sub ExitFF()
    Dim lngVPos As Long
    lngVPos = Selection.Information(wdVerticalPositionRelativeTo Page)
    If lngVPos - lngVertPos > LinesToPoints(3) Then
    MsgBox "Max text length is 3 lines!"
    End If
    End Sub</pre>



    First add these Sub's to a standard module. Then return to the doc and double-click on the FormField. In the box Enter Field, click on the little arrow and choose EnterFF. In the box Exit Field, click on the little arrow and choose ExitFF. Click OK and protect the doc. Tab into this FormField, enter some text and Tab out of this FormField. If you typed more than 3 lines, you should get a message stating that the max length is 3 lines.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •