G
GraemeR
Hi, this code creates a table in a blank document.
I want to fill the middle-most 5 columns with the numbers 1-5 (in the
for-next loop).
Dim rng As Range
Dim intCount As Integer
Set rng = ActiveDocument.Range
ActiveDocument.Tables.Add rng, 2, 1
Set rng = rng.Tables(1).Rows(1).Range
rng.Cells(1).Split 1, 3
Set rng = rng.Tables(1).Rows(2).Range
rng.Cells(1).Split 1, 2
Set rng = rng.Tables(1).Rows(2).Cells(2).Range
rng.Cells.Split 5, 2
For intCount = 1 To 5
' Fill central column
Next
Any hints would be appreciated,
Graeme.
I want to fill the middle-most 5 columns with the numbers 1-5 (in the
for-next loop).
Dim rng As Range
Dim intCount As Integer
Set rng = ActiveDocument.Range
ActiveDocument.Tables.Add rng, 2, 1
Set rng = rng.Tables(1).Rows(1).Range
rng.Cells(1).Split 1, 3
Set rng = rng.Tables(1).Rows(2).Range
rng.Cells(1).Split 1, 2
Set rng = rng.Tables(1).Rows(2).Cells(2).Range
rng.Cells.Split 5, 2
For intCount = 1 To 5
' Fill central column
Next
Any hints would be appreciated,
Graeme.