Add Custom header and footer to Windows Notepad file


Notepad adding custom Header and Footer
Notepad adding custom Header and Footer

For printing a text file using Microsoft Notepad we can add a custom header and footer using the Advance Page Setup feature available under the File menu.

  1. Open Notepad adding custom Header and Footer file with Notepad
  2. Now go to File → Page Setup
  3. You would see Header and Footer Text Boxes
  4. Now add your custom text and with the below keywords,
    1. To insert today's date add : &d
    2. To insert the time add : &t
    3. To insert the page number add : &p
    4. To insert the name of the file : &f
    5. To insert an ampersand (&) symbol add : &&
To align Header and Footer we can use,
  1. &l => To position them left
  2. &r => To position them at right
  3. &c => To position them at the center.
Example if you want a footer to show page as "Page 1", "Page 2" ... and at the center add: &c Page &p





Recent Posts:
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.