Word form textbox size

R

RBM

I had been attempting to create a Word-based (Word 2003) form wherein
by virtue of selecting a certain entry in the first text box various
other text boxes down lower in the form are pre-filled in with
relevant text (i.e. elephant > big, gray, majestic; mouse >small,
brown, verminous, etc.). Anyhow, despite the fact that I can manually
enter an unlimited quantity of text into any given text box, when I
attempt to do it by code I get a message indicating that there is "too
much" text. I haven't counted to characters involved but presume it to
be >~126. Are there any work-arounds for this problem? Should I skip
the secondary text boxes and simply add text at a predetermined
bookmark instead? Would that work? I'll provide more details if you
need them.

Sorry, I had posted this in the wrong forum. It's probably more suited
to VBA as the meat of the work is done by VBA.
 
D

Doug Robbins - Word MVP

There's a 255 character limit on the .Result property of a text box.
Therefore you can insert the first 255 characters of the string using the
..Result property, beyond that, you have to use code to unprotect the form,
use .InsertAfter to insert the balance after the .Range of the bookmark
whose name is assigned to the formfield and then reapply the protection
using the NoReset attribute so that the data is retained in the formfields.

I maybe better to use autotext for the associated text

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
R

RBM

Thanks for the response. So, if I understand this correctly, there's
no limit to the amount of text I can physically type into a text box,
but if I use code to automate the process via the .Result property I
will be limited to 255 characers and will have to kludge together
another solution as you have noted. Correct?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top