View Single Post
 
Old 06-21-2015, 12:47 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

Personally, I'd be inclined to bookmark the table or bind it to a suitably-titled rich text content control, so it no longer matters where the table occurs in the document. Then you could use code like:
Code:
Dim Rng As Range, i As Long
With ActiveDocument.Bookmarks("MyTable").Range.Tables(1)
  Set Rng = .Cell(Row:=3, Column:=3).Range
  i = Len(Rng.Text) - 1
  If i > 40 Then
    MsgBox "40 Char Description: Exceeded Character Limit of 40 " & "(" & i & ")"
  End If
End With
The code for a table bound to a content control is similar.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote