A family of Microsoft word processing software products for creating web, email, and print documents.
Hi James,
If you are building one from scratch programmatically you have to build the host table first and when you do, set its AutoFitBehavior property to wdAutoFitWindow. Then insert the nested cells and let the AutoFitBehavior default.
Sample code below:
Sub NestedTable()
Dim doc As Word.Document, rng As Word.Range, tbl As Word.Table
Set doc = ActiveDocument
doc.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:= _
2, AutoFitBehavior:=wdAutoFitWindow
Set tbl = Selection.Tables(1)
Set rng = tbl.Rows(1).Cells(1).Range
rng.Collapse Word.WdCollapseDirection.wdCollapseStart
rng.Tables.Add rng, NumRows:=1, NumColumns:=1
End Sub
If this doesn't help, provide a sample of the code you are using and tell us what is happening that you want to correct.