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
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top