Notepad the default text editor in Windows 10/11 is a workhorse for creating and editing basic text files.
By default, it doesn’t show header and footer when the text files are printed.
Here is how to add these:
Open Notepad and click on File > Page Setup.
The Header and Footer fields are empty by default. Clicking on the Input Values link will open this Microsoft knowledge base article that lists the different values which can be used.
These include adding the current date and time, the page numbers, the filename and more.
File name as a header: The Header input value would be &f.
Current date and time as a footer: The Footer input values would be &d &t.
Note that you can have multiple input values in the header and footer for Notepad files.
After these are added, when the Notepad file is printed, these would be visible in the printed copy (it will be visible in both – a hard copy and a PDF document).