[Tex/LaTex] Remove underline of header

header-footer

I want to remove the underline of the header "NOT FOR DISTRIBUTION" in the following document:

\documentclass[conference,letterpaper]{IEEEtran}

\setlength{\headheight}{12pt}
\setlength{\headsep}{5mm}

\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{NOT FOR DISTRIBUTION}
\makeatletter
\let\ps@IEEEtitlepagestyle\ps@fancy
\makeatother

\begin{document}
\title{The Title}
\author{Michael Shell \and Homer Simpson}

\maketitle

\lipsum[1-20]

\end{document}

Any suggestions on how to fix this?

Best Answer

The package fancyhdr provides the command \headrulewidth and you should redefine it to use a zero value.

So load the package first and use \renewcommand. Also there is the \footrulewidth command.

\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}