The procedure below will add the THead element.
Sub TheadHTMLAdd()
Dim strHtml As String
strHtml = _
vbCrLf & _
vbTab & _
vbTab & _
"<thead>" & _
vbCrLf & _
vbCrLf & _
vbTab & _
vbTab & _
"</thead>" & _
vbCrLf
'Insert text as first element.
ActiveDocument.all.tags("table"). _
Item(0).insertAdjacentHTML _
"afterBegin", strHtml
'Save the changes
WebDesigner.ActivePageWindow.Save True
End Sub
HTML code before method was run:
<table> </table>
HTML code after method was run:
<table>
<thead>
</thead>
</table>