Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2014, 05:54 AM
NobodysPerfect NobodysPerfect is offline Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2010 32bit
Competent Performer
Limit text length Content Control
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default Limit text length Content Control


Hi to all,

is there any possibility to limit the max. lenght of a Plain Text Content Control? Using Legacy Tools is is easy to set a max. lenght but how can I achieve this with the corresponding Content Control?

Thanks for any help
NP
Reply With Quote
  #2  
Old 02-26-2014, 05:51 PM
macropod's Avatar
macropod macropod is offline Limit text length Content Control Windows 7 32bit Limit text length Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You'd need to use a ContentControlOnExit macro to examine the content and make whetever changes you require. Of course, if the user doesn't exit the content control, you'll end up with the excess content.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-26-2014, 11:26 PM
NobodysPerfect NobodysPerfect is offline Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2010 32bit
Competent Performer
Limit text length Content Control
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

Thanks for your answer, but that's not the solution I've been looking for

NP
Reply With Quote
  #4  
Old 02-26-2014, 11:48 PM
macropod's Avatar
macropod macropod is offline Limit text length Content Control Windows 7 32bit Limit text length Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That's just the way it is, sometimes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 02-27-2014, 01:26 AM
NobodysPerfect NobodysPerfect is offline Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2010 32bit
Competent Performer
Limit text length Content Control
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

You can't always get what you want ...
Reply With Quote
  #6  
Old 02-27-2014, 05:20 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is online now Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 3,908
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

This isn't what you want, either, but ...

You could try putting the content control inside a table cell with fixed dimensions (add or remove borders as desired). Even if people add excessive amounts of text, it won't show up when it is being typed into the bottom margin of the cell.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #7  
Old 02-27-2014, 05:46 AM
NobodysPerfect NobodysPerfect is offline Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2010 32bit
Competent Performer
Limit text length Content Control
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

Hey, that's really a great idea, but it generates a new question: a VBA one.

As I create forms using VBA procedures it would be nice if I could also create the necessary tables (width of cells) on the basis of font and fontsize. Do you know any fomula how to calculate table width according to font, font size, bold? Unfortunately I'm not familiar with fonts issues.

Otherwise tables would not really help

Thx
NP
Reply With Quote
  #8  
Old 02-27-2014, 08:12 AM
Charles Kenyon Charles Kenyon is offline Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Whoa!!! I think we just left Kansas!

You will get a wider response to your recent question if you post it in the vba forum with an appropriate question title. Some of the people best able to provide solutions on this are unlikely to see your detour here.
Reply With Quote
  #9  
Old 02-27-2014, 08:19 AM
Cosmo Cosmo is offline Limit text length Content Control Windows Vista Limit text length Content Control Office 2007
Competent Performer
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

A table isn't going to be able to help you specify an exact number of characters, only an exact width (a capital W is much wider than a lower case i, so you can fit many more i's into the same width as a few W's). Unless you use a monospaced font where all characters are the same width, but those don't read as well as proportional fonts.
Reply With Quote
  #10  
Old 02-28-2014, 02:21 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is online now Limit text length Content Control Windows 7 64bit Limit text length Content Control Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 3,908
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

It can probably be done with a macro, but you'd have to ask elsewhere, as Charles suggested.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #11  
Old 02-28-2014, 02:40 PM
macropod's Avatar
macropod macropod is offline Limit text length Content Control Windows 7 32bit Limit text length Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes, testing the string width can be done with a macro, quite easily in fact. But the point remains that the macro won't fire until you exit the content control, which brings you right back to the original problem that I set out in post #2.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit text length Content Control Move to next content control cksm4 Word VBA 13 07-02-2019 07:48 PM
Limit text length Content Control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Limit text length Content Control Hierarchical content control ntjson Word VBA 1 04-04-2013 12:07 AM
Limit text length Content Control Content control titles jillapass Word VBA 3 05-29-2012 06:11 AM
Retrieving content control value jillapass Word VBA 4 05-24-2012 05:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft