Further, .Exists used for Section.Headers(whatever) does NOT, repeat, NOT, determine if there is a value (text) for that header object. It ONLY checks to see if it is checked in Page Setup. Which is why using .Exist for Primary is pointless, as Primary always exists.
If the purpose is to remove ALL header and footer content, then:[vba]Sub RemoveHeadFoot(wdDoc As Document)
Dim oSection As Section
Dim var, var2
For Each oSection In wdDoc.Sections
For var = 1 To 3
oSection.Headers(var).Range.Delete
Next
For var2 = 1 To 3
oSection.Footers(var2).Range.Delete
Next
Next
End Sub[/vba]will delete everything from all headers and footer in wdDoc.
It is not strictly needed to make a document object and pass it to the removal Sub, as using ActiveDocument will work just as well.