Applies ToWindows 10 Windows 8.1 Windows 7 Windows 11

To open Notepad, select the Start  button, type Notepad, then select Notepad from the results.

Here are answers to a few common questions about Notepad:

When you use Notepad in Windows, you can remove or change headers and footers before printing a document. The default header and footer settings in Notepad are:

  • Headers: &f

  • Footers: Page &p

These commands give you the title of the document on the top of the page and a page number at the bottom of a printed document.

Note: These settings can't be saved, so all header and footer settings must be entered manually each time you want to print a document.

Select Page Setup from the File menu and enter the desired command(s) in the Header and Footer text boxes. If you leave the Header or Footer text box empty, no header or footer will print. Here's a short list of header and footer commands:

Command

Action

&l

Left-align the characters that follow.

&c

Center the characters that follow.

&r

Right-align the characters that follow.

&d

Print the current date.

&t

Print the current time.

&f

Print the name of the document.

&p

Print the page number.

​​​​​​​​​​​​​​

Note: If the formatting code is not the first item in the Header text box, your header is centered regardless of the formatting codes you use. For example, to align a title to the left side of the page, use &lTitle text.

You can use Notepad to create a log-type file that adds the current date and time each time the Notepad file is opened. Here's how to create a log file in Notepad:

  1. Open Notepad.

  2. Type .LOG on the first line, and then press ENTER to move to the next line.

  3. On the File menu, click Save As, type a descriptive name for your file in the File name box, and then click OK.

When you next open the file, note that the date and time have been appended to the end of the log, immediately preceding the place where new text can be added. You can use this functionality to automatically add the current date and time to each log entry.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.