Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-21-2015, 12:47 AM
macropod's Avatar
macropod macropod is offline How to reference more than one table in a Word doc Windows 7 64bit How to reference more than one table in a Word doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 

Tags
error, range, table



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reference more than one table in a Word doc Create updating reference in table droseman Word 1 09-05-2014 05:39 PM
How to reference more than one table in a Word doc extra space when I cross-reference a table or figure Toto Word 1 06-07-2014 03:51 PM
Using reference table BritBiker2 Excel 3 02-23-2013 05:27 AM
Why does Word separate table and reference endnotes by allowing text to go in between newby2013 Word Tables 2 12-31-2012 03:45 PM
How do I reference a merged cell in a multi column & row table in MS Word ('03')? jihanemo Word Tables 0 03-18-2009 08:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:07 AM.


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