You can limit the number of characters in a text form field. You can limit
the size of a table cell or text box.
--
Suzanne S. Barnhill
Microsoft MVP (Word)

Signature
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
> Is there a way that you can tell word to limit the number of words in a cell
> or a textbox ?
[quoted text clipped - 15 lines]
>
> email: oliver.marshall@nospam@adssupport.net
Hi, Olly,
I don't know of any way to prevent people from typing any number of
words into a cell, but you can prevent them from saving or printing
the document while there are too many words. That might solve your
problem.
To do this, you need a series of macros in the template used to base
the documents. Each macro needs a specific name that will cause it to
intercept one of Word's built-in commands -- File > Print, File >
Save, File > Save As, and so on. To intercept the Print commands you
need to write FilePrint and FilePrintDefault. To intercept the Save
commands you need to write FileSave, FileSaveAs and FileSaveAll.
There's more about this at
http://word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm.
As an example, the macro for FileSaveAs would look something like this
(but adjusted for the table number and row/column as necessary):
Public Sub FileSaveAs()
Const MaxWords = 60 ' change as needed
Dim CountWords As Long
Dim CellRange As Range
' if there are no tables, don't test
If ActiveDocument.Tables.Count > 0 Then
' check the cell in row 1, column 2 of
' the first table in the document
' (change this as needed)
Set CellRange = ActiveDocument.Tables(1) _
.Cell(Row:=1, Column:=2).Range
' don't include the end-of-cell marker
CellRange.MoveEnd unit:=wdCharacter, Count:=-1
' get the number of words
CountWords = CellRange.ComputeStatistics(wdStatisticWords)
' if too many, refuse to save
If CountWords > MaxWords Then
MsgBox "The cell contains " & CountWords & _
" words. The maximum is " & MaxWords & _
" words."
Exit Sub
End If
End If
' It passed the test, so save
Dialogs(wdDialogFileSaveAs).Show
End Sub
>Is there a way that you can tell word to limit the number of words in a cell
>or a textbox ?
[quoted text clipped - 7 lines]
>
>Olly
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://www.mvps.org/word