The method below will accept the table title, number of TBody rows, number of THead rows, number of TFoot rows and number of columns and create a Table in Expression Web.
Function AddTable( _ ByVal strTitle As String, _ ByVal intBodyRows As Integer, _ ByVal intColumns As Integer, _ ByVal intHeaderRows As Integer, _ ByVal intFooterRows As Integer) _ As Boolean On Error GoTo errHandler1: AddTable = False Dim arrGeneral As Variant arrGeneral = GetIndexTitleNumbers(strTitle) If Not TableHTMLAdd(strTitle) Then GoTo errHandler1 If intHeaderRows > 0 Then If Not THeadHTMLAdd() Then GoTo errHandler1 If Not THeadRowsAdd(intHeaderRows, intColumns) _ Then GoTo errHandler1 End If If intFooterRows > 0 Then If Not TFootHTMLAdd() Then GoTo errHandler1 If Not TFootRowsAdd(intFooterRows, intColumns) _ Then GoTo errHandler1 End If If intBodyRows > 0 Then If Not TBodyHTMLAdd() Then GoTo errHandler1 If Not TBodyRowsAdd(intBodyRows, intColumns) Then _ GoTo errHandler1 End If AddTable = True Exit Function errHandler1: MsgBox "AddTable has Failed", _ vbCritical, "Function Failure" End Function