View Single Post
  #9   Report Post  
Posted to microsoft.public.word.tables
Greg Maxey
 
Posts: n/a
Default Auto number a column in table using SEQ

Kaz,

Provided that your bookmark spans only the table of interest, you could use
this line (all on one line):

Set oTbl = ActiveDocument.Bookmarks("mytable").Range.Tables(1 )

where "mytable" stands in for the name of your bookmark.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


kaz wrote:
Yes, I guess a cell containing any text. What I have is a table where
the first column is a sequential number, automatically generated for
each new row. I am currently creating that number just using standard
list numbering. I did have my field (outside of the table) simply
doing a COUNT on that first column but that doesn't work. I am
guessing that is because Word doesn't recognise the content of the
field as being numeric?!? So if I use the code described by Greg, how
do I ensure that is pointed to that specific table (as my document
has a few other tables in it). When I was trying to do this using
COUNT I had bookmarked the table in question and used that bookmark
name in the COUNT function. Do I just change the "Set oTbl" statement
to point to the bookmark?