Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2045
  • Last Modified:

Add serial number in table - Word 2007

Hello there,

I have created a table with 3 cols and i want to add serial number counter in the first col.how can i do it.i am using word 2007
0
zolf
Asked:
zolf
2 Solutions
 
GrahamSkanRetiredCommented:
You could try selecting the first column and making a numbered list with the Numbering button in the Paragraph group on the Home tab.

Or you could use some VBA code like this:
    Dim tbl As Table
    Dim r As Integer
    
    Set tbl = ActiveDocument.Tables(1)
    For r = 1 To tbl.Rows.Count
        tbl.Cell(1, 1).Range.Text = r
    Next r

Open in new window

0
 
Chris BottomleyCommented:
If it's a 'new' table then add a paragraph number to the first column and each time you add a row the number will update accordingly?

Chris
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now