'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.DrawingImportsGrapeCity.Documents.Word PublicClassNestedTableHelpersFunctionCreateDocx() AsGcWordDocumentDim doc AsGcWordDocument = NewGcWordDocument() doc.Body.AddParagraph("Here is a 5 columns by 3 rows table, with a nested table in cell (2, 2):")Dim t = doc.Body.AddTable(NewString()() {NewString() {"row 1, col 1", "row 1, col 2", "row 1, col 3", "row 1, col 4", "row 1, col 5"},NewString() {"row 2, col 1", "row 2, col 2", "row 2, col 3", "row 2, col 4", "row 2, col 5"},NewString() {"row 3, col 1", "row 3, col 2", "row 3, col 3", "row 3, col 4", "row 3, col 5"} }) Dim ts1 = doc.Styles.Add("Table Style 1", StyleType.Table)ForEach border In ts1.Table.Borders border.LineStyle = LineStyle.Triple border.LineWidth = 0.5F border.Color.RGB = Color.PurpleNext t.Style = ts1 ts1.Table.Borders.InsideHorizontal.LineStyle = LineStyle.Double ts1.Table.Borders.InsideVertical.LineStyle = LineStyle.Double ts1.Table.Padding.All = 3 Dim cell = t.Rows(1).Cells(1)Dim tn = cell.AddTable() cell.GetRange().Paragraphs.First.GetRange().Texts.First.Value = "Cell with nested table." tn.Rows.Add("Nested (1,1)", "Nested (1,2)", "Nested (1,3)") tn.Rows.Add("Nested (2,1)", "Nested (2,2)", "Nested (2,3)") tn.Rows.Add("Nested (3,1)", "Nested (3,2)", "Nested (3,3)") Return docEndFunctionEndClass