• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 646
  • Last Modified:

Text Form Field - Word

I've inserted a text form field in a table I've created in MS Word 2003. I've limited the number of characters that the form field can have and I've also limited the size of the row on the table so that the cell doesn't jump to the next page.

What I want is to limit the number of lines the form field can be. Can this be done? (i.e. I would like the form field to be at max 5 lines -- so when a user types up to 5 lines of text, they hit a limit; and if they hit enter 5 times, they hit a limit)
0
victornegri
Asked:
victornegri
  • 8
  • 6
  • 2
1 Solution
 
bruintjeCommented:
Hi victornegri,
----------

you could look at this post from Jay Freedman outlining the steps to have exact row height and limiting your number of lines through that way
http://groups.google.com/group/microsoft.public.word.docmanagement/msg/82589beb99a4798c

1. Insert a table. (For simplicity I'll assume it's one row by one column, but it could be more.)

2. On the Table menu, select AutoFit > Fixed Column Width.

3. On the Table menu, select Table Properties. Click the Row tab. Check the "Specify height" box, enter 140pt in the middle box, and set the right-hand dropdown to Exactly. (This assumes you're using 12 pt text, for which 10 lines occupies 140 points. For other sizes, adjust as needed.)

4. With the cursor in the cell, click the Text Form Field button on the Forms toolbar. Protect the template.

----------
bruintje
share what you know, learn what you don't
0
 
victornegriAuthor Commented:
I've already done that. What I want to do is limit the number of rows. Right now I have a text form field in a cell that is set to an absolute value of 1.7". The text form field is set to only allow 600 characters. If I type in one paragraph, 600 characters stop before the end of the cell size. The problem is that each carriage return only counts as one character. So it's possible for a user to type multiple paragraphs and exceed the allotted space (i.e. keep on hitting return and the cursor goes off the screen).
0
 
dopyiiiCommented:
Another solution is to use the Text Box ActiveX control on the Control Toolbox (View > Toolbars > Control Toolbox).  You could put in the text box and change the various options (in Design Mode, right-click > properties).  The following would be similar to what you're looking for:

1. Multiline: true (this allows multiple lines of text so it behaves similar to a text box)
2. EnterKeyBehavior: false (this makes it so that they simply can't hit enter)
3. WordWrap: true (so that you don't have to horizontally scroll
4. MaxLength: 600 (to limit to 600 characters)

Just remember to turn off Design Mode when you're done (the Square/Penic/Ruler icon on the Control Toolbox toolbar).

Of course, the big problem here is that you can't hit enter; but maybe that's not a big deal in this case.  I'm not sure of any other way (short of customizing this control with some VBA) to limit the number of actual lines in a control.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
dopyiiiCommented:
Sorry, that's Pencil, not Penic :S
0
 
bruintjeCommented:
tried VBA and it crashed my word 10 times before work took over :)

hopefully the manual wau posted by dopyiii does the trick
0
 
victornegriAuthor Commented:
I tried an ActiveX Text Box also and when I set protection on the document, I wasn't able to type in the ActiveX box. Is there a way to unrestrict this? The protection level I set was to only allow the user to fill in form fields.

... which brings up another stipulation... the users are not allowed to modify the form, only fill in the fields and save it.
0
 
dopyiiiCommented:
You can protect the document by section, putting the ActiveX text box in it's own unprotected section.  Just insert a continuous section break immediately before and immediately after the ActiveX text box.  Then, when you protect your document, do it by sections and uncheck the section with your text box in it (probably section 2).
0
 
dopyiiiCommented:
You know, I was just checking and I can protect as read-only a document with the activeX control and a regular form control and I can still edit the activex control (even tab between the two).  I also noticed that I had to turn off design mode in order to protect the document, so that shouldn't be a problem.  What do we have different I wonder...
0
 
victornegriAuthor Commented:
I can't edit or type in anything when I save as read-only. When I protect as "Filling in forms" I'm able to type in form fields but not the ActiveX text box. If I leave everything unprotected, I can type in all places.
0
 
dopyiiiCommented:
Well the read-only protection makes sense: it's read only.  The filling in forms is what you should use.  Do you have the Locked property on the text box set to true?  If so, set it to false.
0
 
victornegriAuthor Commented:
Locked is set to false.
0
 
dopyiiiCommented:
I think I'll need a little more info on how you have your document setup.

Try making a really quick new document with an activex text box and protect it (that's what I've been doing).  If that works, then it's got to just be something simple.  The only way I have gotten this to not work is by setting the Locked property to true.  Have you set any other properties other than the MaxLength and WordWrap?
0
 
victornegriAuthor Commented:
I created a new document with only an ActiveX Text Box. Protected it with the "Filling in Forms" protection. Saved it. Reopened it. And I can't type in the text box.

If it makes any difference, the control I'm using is the "Microsoft Forms 2.0 Text Box".
0
 
dopyiiiCommented:
What's your macro security setting set to?  

I had to enable macros to make it work.  Otherwise, I couldn't edit it either after I saved/closed/opened it.
0
 
victornegriAuthor Commented:
That did it! Thanks!
0
 
dopyiiiCommented:
You're welcome!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 8
  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now