Application VisualBasic Script

Sub ToggleHeadings()
    ActiveWindow.DisplayHeadings = Not ActiveWindow.DisplayHeadings
End Sub