You missed the comment you reproduced in the code.
Code:
Function HeaderFooter(oDoc As Document) As Boolean
On Error GoTo Err_Handler
'Do Something with oDoc here. e.g.,"
With oDoc
With .PageSetup
.HeaderDistance = CentimetersToPoints(2.6)
.FooterDistance = CentimetersToPoints(2.6)
End With
HeaderFooter = True
End With
lbl_Exit:
Exit Function
Err_Handler:
HeaderFooter = False
End Function