Counting which table you're in

J

James

I'm using a doc w/multiple tables. How can I tell from the current
selection point which # table the user is in?
Tks.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < James > écrivait :
In this message, < James > wrote:

|| I'm using a doc w/multiple tables. How can I tell from the current
|| selection point which # table the user is in?
|| Tks.

Something like this:

'_______________________________________
Dim myRange As Range
Dim TableIndex As Long

Set myRange = ActiveDocument.Range
myRange.SetRange myRange.Start, Selection.Start

TableIndex = myRange.Tables.Count
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top