Once you add a header to a Google document, it offsets the top of the document even if empty, and receives click events. How can you then remove the header?I am aware that you can reduce the header's effects by decreasing the page's top margin, and reducing the font size in the headerthose are not the solutions I am looking for. I would like a way to actually REMOVE it.
How to remove the header from a Google document once added
google documents
The following line of code will reset the header (gray line disappears).Codefunction onOpen() {  DocumentApp.getUi().createMenu(Header / Footer)    .addItem(Reset header, resetHeader)    .addItem(Reset footer, resetFooter)    .addToUi()}function resetHeader() {  try {    DocumentApp.getActiveDocument().getHeader().removeFromParent();  } catch(e) {    throw No header present !!;  }}function resetFooter() {  try {    DocumentApp.getActiveDocument().getFooter().removeFromParent();  } catch(e) {    throw No footer present !!;  }}ScreenshotbeforeafterNoteI've noticed that after running the script (and thus removing the header or footer), adding them wasn't possible on the document I was working on.Add the code under Tools > Script editor..., press the bug button to authenticate the script and then press the play button. This will play the code and reset the header.editSee Google Help Forum for an extensive walk-through: How to remove the header in Google Docs?