Loop Through Headers Excluding First Page
Hi Guys,
I have the following code which loops through each of the headers in a document and deletes any tables which are present.
Code:
Sub DeleteTablesInHeaders()
Dim sec As Section
Dim hdr As HeaderFooter
Dim i As Integer
For Each sec In ActiveDocument.Sections
For Each hdr In sec.Headers
If hdr.Exists Then
For i = hdr.Range.Tables.Count To 1 Step -1
hdr.Range.Tables(i).Delete
Next i
End If
Next hdr
Next sec
End Sub
How can this be amended to exclude the first page?
Thanks in advance.