Prevent use of BBCode in Header

Is there any way to prevent the use of BBCode in the header of a document? I am trying to use the following in a header and it keeps applying underlining and dumping the underscores.

Lastname_Firstname_Course_Coursenumber_Documentname

I appreciate any help you can provide.

Sincerely,
Colin

There isn’t actually a way to do that. What you can do is use something other than the Low Line character. Since you’re aiming for PDF, I’m assuming it doesn’t matter too much if the character is correct, more just that it looks right. There are similar glyphs in the Unicode set, I found that the HORIZONTAL SCAN LINE–9 (⎽) character works fine, and with the font I was using it even fit in better with the text than the standard character does.