![]() |
|
#2
|
||||
|
||||
|
Provided the tables are in the body of the document and not in headers footers, text boxes etc, and are similar to that shown, then the following should work.
Code:
Sub NumberTables()
Dim oTable As Table
Dim i As Long, j As Long
Dim oCell As Range
i = 1
For Each oTable In ActiveDocument.Tables
For j = 2 To oTable.Rows.Count
Set oCell = oTable.Cell(j, 1).Range
oCell.End = oCell.End - 1
oCell.Text = i & Chr(46) 'This is what goes in the cells!
i = i + 1
Next j
Next oTable
lbl_Exit:
Set oTable = Nothing
Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic Mail Merged Table | hanskimber | Mail Merge | 2 | 04-24-2015 11:21 PM |
Add content to Dynamic/Automatic Table of Contents
|
rosenina18 | Word | 3 | 04-14-2015 05:15 AM |
| Dynamic Pivot Table in 2013 | Alaska1 | Excel | 0 | 01-29-2015 10:33 AM |
Mail Merge Into Dynamic Table
|
Jag618 | Mail Merge | 1 | 03-04-2013 11:26 PM |
VBA: Include Dynamic Sheet Name In Pivot Table Source Data
|
ibrahimaa | Excel Programming | 2 | 04-28-2012 12:27 AM |