Hi all, is there a good way to limit the number of characters in text box content control? I've been googling all over the place but all the answers were either VBA or just dead ends.
Word 2010 is under the question.
Thanks in advance!
Hi all, is there a good way to limit the number of characters in text box content control? I've been googling all over the place but all the answers were either VBA or just dead ends.
Word 2010 is under the question.
Thanks in advance!
Last edited by Exceltrouble; 09-02-2016 at 02:36 AM.
The answer is VBA.
How are you using the textbox? What kind of limitation do you want? Is there a reason that you don't want to or can't use VBA?
They describe non VBA solution here: http://superuser.com/questions/80783...soft-word-2010
I fail to follow these steps that are described there.
Main reason for opting out from VBA is my own poor knowledge of it as well all kinds of problems users tend to run against when using macro based workbooks/documents.
You cannot limit the amount of text input into a content control without resorting to VBA. If you need that kind of functionality, you will need to use formfields. Do note, however, that you should not use formfields and content controls in the same document, as they weren't designed to work together, and formfields require Word's 'filling in forms' protection to work.
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
.
.
.
I presume you are using a TextBox on a UserForm ? Refer to the image below:
.
.
MaxLength.jpg
.
.
.
The image refers to the VBA editor. If you are using a UserForm with a TextBox, click on the TextBox then look to the left in the Properties
settings. Locate MaxLength and set the total number of characters you desire.
You can limit the length if you use a cell with Data Validation (custom formula) instead of a TextBox. Is there any reason you must use a textbox?
At this point it would be helpful for you to attach your file. Under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
Adding document where example text box content control has been added. Sometimes it is a bit mind boggling that instead having this as standard functionality, you need to engage in VBA. If this is the case of course
My mistake, I didn't notice this was in a Word forum; I accessed from the Unanswered Threads list. My answer about using a cell applies only to Excel.
So we are back to VBA for your issue. I have not done this exact thing in Word so would have to develop the solution. I'll be back if I come up with it.
As indicated in my previous reply, you can doing without VBA using formfields, but not when using content controls. If you're wedded to using content controls, though, see:
http://gregmaxey.mvps.org/word_tip_p..._controls.html
and, if you want to limit the length of whatever is input into one, see also:
http://gregmaxey.mvps.org/word_tip_p...om_events.html
Thanks guys, I opt out from VBA at the moment and simply go with instructional text
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks