V
VBA Coder
Does anyone know how I can insert a New Table into a cell of another table?
In Word 2000, I can issue the following code when I am within a cell of a
table and the table gets inserted correctly:
Dim rRange As Range, myTable As Table
With Selection
Set rRange = .Range
Set myTable = rRange.Tables.Add(Range:=.Range, NumRows:=2,
NumColumns:=4)
End With
However, in Word97, I am not able to do this. I get an error telling me that
a table already exists. Has anyone had any success with being able to insert
a new table into a cell of an existing table without doing a lot of cell/row
inserts and cell merges?
In Word 2000, I can issue the following code when I am within a cell of a
table and the table gets inserted correctly:
Dim rRange As Range, myTable As Table
With Selection
Set rRange = .Range
Set myTable = rRange.Tables.Add(Range:=.Range, NumRows:=2,
NumColumns:=4)
End With
However, in Word97, I am not able to do this. I get an error telling me that
a table already exists. Has anyone had any success with being able to insert
a new table into a cell of an existing table without doing a lot of cell/row
inserts and cell merges?