The procedure below will add the TFoot element. It will be added immediately after the fitst THead element.
Sub TFootElementAdd()
On Error GoTo errHandler1:
Dim objelement As IHTMLElement
Dim strHTML As String
strHTML = _
vbCrLf & _
vbTab & _
vbTab & _
"<tfoot>" & _
vbCrLf & _
vbCrLf & _
vbTab & _
vbTab & _
"</tfoot>" & _
vbCrLf
Set objelement = ActiveDocument.all. _
tags("table").Item(0).tHead
objelement.insertAdjacentHTML _
"afterEnd", strHTML
WebDesigner.ActivePageWindow.Save True
Exit Sub
errHandler1:
MsgBox "THead was not found." & _
vbCrLf & "Please add THead first"
End Sub
HTML code before method was run:
<table>
<thead>
</thead>
</table>
HTML code after method was run:
<table>
<thead>
</thead>
<tfoot>
</tfoot>
</table>