Field to count table rows?

E

Ed

I'm writing several reports, each containing several tables that will expand
or contract as those-who-know-everything change their collective
half-a-mind! Each table has a preceeding paragraph saying "The follow table
contains details of <QTY HERE> incidents." I'm wondering if there is a
field or formula I can insert at <QTY HERE> that will keep track of how many
data rows each table has, so as I add or delete rows the total will show and
I won't have to recount every table?

Ed
 
S

Suzanne S. Barnhill

I suspect there's a way to access this via VBA and perhaps write it to a
custom document property, which could then be inserted in the document using
a DocProperty field. But if you just need help counting the rows (the
VBA-less solution), you can get the TableCellHelper macro available from
http://www.mvps.org/word/FAQs/AppErrors/SumAboveIncorrect.htm, which returns
the number of rows and columns in a table and the address of the current
cell.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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