Platinum Edition Using Windows 98

Previous chapterNext chapterContents


- 14 -

Using Notepad and Wordpad


by Bob Voss

Using Notepad

Notepad is a miniature text editor. Just as you use a notepad on your desk, you can use Notepad to take notes onscreen while working in other Windows applications. Notepad uses little memory and is useful for editing text you want to copy into a Windows or DOS application that lacks editing capability.

Notepad retrieves and saves files in text format. This makes Notepad a convenient editor for creating and altering text-based files. Because Notepad stores files in text format, almost all word processing applications can retrieve Notepad's files. However, if you want the capability of formatting your documents, you'll need a true word processor. See "Creating Documents in WordPad," later in this chapter, to learn how to use the word processor that comes with Windows 98.

Starting Notepad

To start Notepad, open the Start menu and choose Programs, Accessories, Notepad. Notepad starts up and displays a blank document in the Notepad window (see Figure 14.1). You can begin typing.

FIG. 14.1 The initial blank Notepad file is ready for text.

Working with Documents in Notepad

You can move the insertion point by using either the mouse or the keyboard. You select and edit text in Notepad the same way you select and edit text in WordPad. See "Selecting and Editing Text" later in the chapter for details.

Limited formatting is available from the File, Page Setup command. You can change margins and add a header or footer, but you cannot format characters or paragraphs in any way. You also can use the Tab, Spacebar, and Backspace keys to align text. Tab stops are preset at every eight characters.

With the commands on Notepad's Edit menu, you can cut, copy, and move text from one place in a file to another. Text that you cut or copy is stored in the Clipboard. When you paste text, the contents of the Clipboard is copied from the Clipboard to the document at the location of the insertion point.

Creating a Time-Log File with Notepad

By typing a simple entry (.LOG) at the top of a Notepad document, you can have Notepad enter the current time and date at the end of a document each time you open the file. This feature might be convenient if you have to take phone messages or calculate the time spent on a project. Note that you must enter the text .LOG on the first line of the document, and it must be uppercase. As an alternative, you can choose Edit, Time/Date or press F5 to insert the current time and date at the location of the insertion point.


TIP: Notepad can open binary files, but WordPad cannot. Although most of what you see when you open a binary file is unreadable, you can sometimes find helpful information in the header of the binary file. This is a good reason to keep Notepad on your computer, even if WordPad is more suitable for most tasks.

Creating Documents in WordPad

WordPad is the word processor that comes with Windows 98 that can perform most basic word processing tasks. Although it is not nearly as powerful and versatile as a full-featured word processing application (such as Microsoft Word 97), it is much more powerful than Notepad, the text editor that comes with Windows 98. Notepad is great for editing simple text files, such as AUTOEXEC.BAT, CONFIG.SYS, or any of the INI files, but it is limited to working with files under 50K in size, and it cannot be used to format text. With WordPad, you can perform all the basic editing tasks, such as cutting and pasting text and finding and replacing words and phrases. You can also format characters, paragraphs, and documents. In addition, WordPad is OLE-compliant, which means you can share data with other OLE-compliant applications. However, WordPad does not have many of the features found in advanced word processors, such as a spell checker, tables, headers and footers, and mail merge.

Creating a New Document in WordPad

WordPad is located in the Accessories submenu of the Start menu. To start WordPad, open the Start menu and choose Programs, Accessories, WordPad. The WordPad window appears, as shown in Figure 14.2. When you first open WordPad, you are presented with a blank document. You might see different screen elements than those shown in Figure 14.2, depending on which elements have been added or removed using the View menu.

FIG. 14.2 WordPad starts with a blank document in which you can begin typing. To create a new document in WordPad, follow these steps:

1. Choose File, New or click the New button on the toolbar to display the New dialog box (see Figure 14.3).

2.
Select the type of document you want to create:

Word 6 Document. This document type can be opened in Word 6, Microsoft Word 95, and Microsoft Word 97.

Rich Text Document. This format (RTF) is compatible with several word processing programs and includes fonts, tabs, and character formatting.

Text Document. This format includes only simple text characters with no formatting and is useful for creating batch files. Unicode Text Document. A universal character standard that uses a double-byte character set containing more than 38,000 characters, including characters for most of the major languages.

3. Click OK.

FIG. 14.3 Select one of the four document types when you create a new document.

If you already have a document open, WordPad prompts you to save changes to that document if there are unsaved changes, and then WordPad closes that document. You can work on only one document at a time in WordPad because it does not support the Multiple Document Interface (MDI) standard.

You can enter and edit text in a WordPad document just as you would in any word processor, using the standard keys for moving around the document and deleting text. See "Selecting and Editing Text" later in the chapter for details.

Because WordPad is an OLE 2-compliant application, you can insert objects from other OLE applications into a WordPad document, or you can insert all or part of a WordPad document into another OLE application. You can, for example, insert a graphic created in Windows Paint as an object into a WordPad document and then double-click the Paint object and edit the graphic in place. When you do so, the WordPad menus and toolbars are replaced with the Paint menus and toolbars while you edit the object. You also can use the Insert, Object command or the drag-and-drop method for exchanging information with other OLE applications.

Opening WordPad Documents

To open an existing WordPad document, follow these steps:

1. Choose File, Open, or click the Open button in the toolbar. The Open dialog box appears (see Figure 14.4).

FIG. 14.4 Use the Open dialog box to locate and open WordPad documents.

2. Navigate to the disk and folder where the file you want to open is located.

3.
Select the type of files you want to list from the Files of Type box.

4.
Select the file you want to open and choose Open, or double-click the filename.


TROUBLESHOOTING:

When I try to save a file in WordPad with a non-default extension, WordPad appends the filename with the .DOC extension. Why? When you save a file with an extension that is not associated with an application in the Registry, WordPad appends the default .DOC extension to the filename. In Notepad, the default extension .TXT is appended to the filename. To avoid this, enclose the filename in quotation marks.


Saving WordPad Documents

To save a document in WordPad, follow these steps:

1. Choose File, Save As, or click the Save button in the toolbar to display the Save As dialog box (see Figure 14.5).

FIG. 14.5 The Save As dialog box enables you to save a file in any drive, folder, or format you want.

2. Select the drive and folder where you want to save the file.

3.
Type the name for the file in the File Name text box.

4.
Select a format from the Save as Type list if you want to save the file in a format other than WordPad.

5.
Click Save or press Enter.

After you have saved a file for the first time, you can resave that file by choosing File, Save or by clicking the Save button in the toolbar.

Using WordPad to Create and Edit System, Batch, and Text Files

WordPad is very useful for creating and editing .TXT and system files (that is, files with the extensions .BAT, .SYS, .INI, and so on), especially when the file in question is too large for Notepad. When you open a .SYS, .INI, .BAT, or .TXT file in WordPad, edit or view it, and then resave it, it is saved with its original file extension. This feature eliminates the possibility of inadvertently saving a system file with the wrong extension, as can happen in a regular word processing program. In addition, WordPad provides more features (such as the Replace command) for editing your files than does Notepad.

To create a new text file in WordPad, choose File, New and select Text Document in the New dialog box. When you save the document, it is given the .TXT extension automatically. If necessary, change the extension (for example, to .BAT for a DOS batch file).


TIP: Create a shortcut for WordPad in the SendTo folder so you can quickly open any file with WordPad from Explorer or a folder window.

You can change the association for .TXT files so that they open in WordPad instead of Notepad when you open them from Explorer or My Computer. To change the association, follow these steps:

1. Choose View, Folder Options in Explorer or My Computer and select the File Types tab.

2.
Select Text Document from the Registered File Types list, and then click Edit.

3.
In the Actions list of the Edit File Type dialog box, select Open. Then click Edit.

4.
Choose the Browse button. Then locate and select WORDPAD.EXE, which is located in the Program Files\Accessories folder.

5.
Click OK and make sure that .TXT is selected in the Default Extension for Content list.

6.
Click Close twice.

Creating Post-It Notes on Your Desktop

Because WordPad is an OLE 2-compliant application, you can drag and drop selected portions of a WordPad document into other OLE applications or onto the desktop. When you drag a selection onto the desktop, you create a scrap; double-click the icon for the scrap, and WordPad opens to display the information in the scrap. You can use these scraps as electronic Post-It notes--bits of information you might otherwise lose track of, secured to your desktop.

If you create desktop notes frequently, such as while you're on the phone, you can add WordPad to your StartUp folder so that it is immediately available, or you can simply create a shortcut on the desktop to WordPad. To create a note on your desktop, follow these steps:

1. Open WordPad and create the note.

2.
Select the note and drag and drop it on the desktop. The scrap appears as a desktop icon, labeled with the first few words of the note. The data is saved as a file in the desktop folder.

You can rename the scrap if you want. Note also that you don't have to save the note in WordPad. Whenever you double-click the scrap icon, the note is opens in WordPad. If you open the scrap and make changes, the changes are automatically saved to the scrap when you close WordPad.

Selecting and Editing Text

WordPad uses standard editing techniques, as found in most word processors. You can place the insertion point wherever you want to add text and begin typing. To delete characters, press Backspace (to delete characters to the left) or Del (to delete characters to the right).

When you need to work with larger blocks of text, such as words, sentences, or paragraphs, you can use your mouse to select the text using one of the techniques listed in Table 14.1.

Table 14.1  Mouse Techniques for Selecting Text

Selection Action
One word Double-click the word.
Several words Double-click the first word and drag to the end of the last word.
Any amount of text Hold down the mouse button and drag from the beginning to the end of the text.
Between two points Move the insertion point to the beginning, click, move to the second point, press and hold down Shift, and click at the second point.
One line Click the selection bar (white space) to the left of the line.
Several lines Hold down the mouse button and drag up or down in the selection bar.
Paragraph Double-click in the selection bar (blank area) to the left of the paragraph.
Entire document Press Ctrl and click in the selection bar.
To select text with the keyboard, position the insertion point at the beginning of the text you want to select, hold down the Shift key, and move the insertion point to the end of the text using the arrow keys. To move the selection a word at a time, hold down the Shift and Ctrl keys as you press the arrow keys. You can select all the way to the end of a line by pressing the Shift and End keys.

After you have selected a block of text, you can delete it using the Del or Backspace keys. To move or copy the selected text, use the Edit, Cut or Edit, Copy keys, as described in the next section. If you start typing when text is selected, the selected text is replaced with whatever you type.

Moving and Copying Text

You can move or copy text using either the menu commands or the mouse. To move or copy text with the menu commands, follow these steps:

1. Select the text you want to move or copy using one of the techniques described in the previous section.

2.
Choose Edit, Cut, or press Ctrl+X, or click the Cut button on the toolbar.

or

Choose Edit, Copy, or press Ctrl+C, or click the Copy button on the toolbar.

3.
Position the insertion point where you want to move or copy the text.

4.
Choose Edit, Paste, press Ctrl+V, or click the Paste button on the toolbar.

To move or copy text using the mouse, follow these steps:

1. Select the text you want to move or copy.

2.
Point to the text with the mouse, hold down the mouse button, and drag the insertion point to the location where you want to move or copy the text.

If you are copying the text, hold down the Ctrl key as you drag the text. A plus sign appears next to the mouse pointer, indicating that the text will be copied.

3.
Release the mouse button.

WordPad is an OLE-compliant application, which means you can also drag text from a WordPad document into documents in other OLE-compliant applications. To simplify this operation, place the two application windows side by side before you move or copy the text.

Finding and Replacing Text

WordPad has find and replace commands that enable you to find a string of text, and if you want, to replace the found text with new text.

To find a string of text, follow these steps:

1. Choose Edit, Find or press Ctrl+F. The Find dialog box appears (see Figure 14.6).

FIG. 14.6 Use the Find dialog box to search a document for a string of text.

2. In the Find What text box, type the text string you want to find.

(Optional) Select the Match Whole Word Only option to find text that exactly matches the text you typed in the Find What text box.

(Optional) Select the Match Case option to find text that has the same case structure as the text you typed in the Find What text box.

3.
Choose Find Next to find and select the first occurrence of the text.

4.
Choose Find Next again to select the next occurrence of the text.

5.
When you find the text you're looking for, click Cancel or press Esc.

Even after you close the Find dialog box, you can repeat the last find operation by choosing Edit, Find Next or by pressing F3.

To find and replace a text string, follow these steps:

1. Choose Edit, Replace to display the Replace dialog box (see Figure 14.7).

FIG. 14.7 You can search for a text string and replace it with new text using the Replace dialog box.

2. Type the text you want to replace in the Find What text box.

3.
Type the text you want to insert in the Replace With text box.

4.
Choose Find Next to locate the first occurrence of the text you typed in the Find What text box.

5.
If you want to replace this text with the text in the Re_place With text box, click Replace.

or

If you don't want to replace this text with the new text, click Find Next again to locate the next occurrence of the text.

6.
To automatically replace all occurrences of the text in the Find What text box with the text in the Replace With text box, choose Replace All.

7.
When you finish replacing text, click Cancel or press Esc.

Formatting in WordPad

WordPad enables you to format characters, paragraphs, and documents. At the character level, you can select a font, point size, and character attribute (such as bold and italic). At the paragraph level, you can align text to the left, right, or center. You can also specify the left, right, and first-line indents for a paragraph. At the document level, you can set the margins, change the orientation of the document (either portrait or landscape), and specify the paper size and which tray of your printer is used.

Formatting Characters

You can format characters using either the menu or the Format bar. To format text you have already typed, select the text first and then choose the formatting. To format text you are about to enter, position the insertion point where you will enter the text, and then choose the formatting.

To format characters using the menu commands, follow these steps:

1. Choose Format, Font to open the Font dialog box (see Figure 14.8).

FIG. 14.8 Select character formatting in the Font dialog box.

2. Select a font from the Font list box, a font style from the Font St_yle list box, and a point size from the Size list box. To preview your selections, look in the Sample box.

(Optional) You can also select the Strikeout and Underline effects in the Effects box, and you can select a font color from the Color list.

3.
When you finish making your selections, click OK.

You can make the same formatting selections from the Format bar. If the Format bar is not visible, choose View, Format Bar to display it. You can also toggle the font effects (bold, italic, and underline) on and off from the keyboard. Press Ctrl+B for bold, press Ctrl+I for italic, and press Ctrl+U for underline.

Formatting Paragraphs

In WordPad, you can adjust the text alignment and indentation of paragraphs. To format a paragraph, place the insert point in the paragraph you want to format and then make your formatting selections. If you want to format more than one paragraph, select all of the paragraphs you want to format. You can make your paragraph formatting selections using either the menu commands or the Format bar and ruler.

To format paragraphs using the menu, follow these steps.

1. Select the paragraphs you want to format.

2.
Choose Format, Paragraph to display the Paragraph dialog box (see Figure 14.9).

3.
Specify the indentation settings in the Left, Right, and First Line text boxes.

WordPad uses inches to measure indentations and margins, not number of characters. This is because WordPad uses both proportionally spaced fonts and fonts of different sizes. Make sure you enter your settings in inches.

4.
Select a paragraph alignment from the Alignment list.

5.
When you finish making your selections, click OK.

FIG. 14.9 Adjust the alignment and indentation for paragraphs in the Paragraph dialog box. To set indentations using the ruler, follow these steps:

1. Choose View, Ruler if the ruler is not displayed.

2.
Select the paragraph or paragraphs you want to change.

3.
Drag the indent markers on the ruler to the desired settings.

You can change paragraph alignment using the Format bar. Select the paragraph or paragraphs you want to change, and then click the Align Left, Center, or Align Right button on the toolbar.

Creating a Bulleted List

WordPad enables you to add bullets to a list of items. To create a bulleted list, first type the items in the list. Each item should be a separate paragraph. Then select all the paragraphs and choose Format, Bullet Style to add the bullets. You can remove bullets by selecting the bulleted items and choosing Format, Bulleted Style again. If you press Enter at the end of a bulleted item to start a new paragraph, the new paragraph will also be bulleted.

Formatting a Document

Document formatting affects the appearance of an entire document. When you set the margins for a document, for example, those settings affect every page of the document.

To change the document formatting, follow these steps:

1. Choose File, Page Setup to display the Page Setup dialog box (see Figure 14.10).

FIG. 14.10 Use the Page Setup dialog box to change the margins, orientation, and paper size for a document.

2. Enter the settings for the margins (in inches) in the Left, Right, Top, and Bottom text boxes.

3.
Select either Portrait or Landscape orientation.

4.
Select a paper size from the Size list.

5.
If necessary, make a different selection from the Source list.

6.
Click OK to put your changes into effect.

Setting Tabs

By default, WordPad has tab settings every one-half inch. You can also set custom tabs by using either the menu or the ruler. WordPad only uses left-aligned tabs.

To set a custom tab with the menu, follow these steps:

1. Select the paragraph in which you want to set the custom tabs.

2.
Choose Format, Tabs to display the Tabs dialog box (see Figure 14.11).

FIG. 14.11 Set custom tabs in the Tabs dialog box.

3. Enter the setting for the custom tab in the text box (in inches).

4.
Choose Set.

5.
Repeat steps 3 and 4 to set up additional custom tabs.

6.
To clear a tab, select it in the list of tabs and choose Clear.

7.
When you finish settings tabs, click OK.

To set a custom tab using the ruler, select the paragraph in which you want to set custom tabs, and then click on the ruler wherever you want to set a tab. You can move an existing tab by dragging it along the ruler with the mouse. To remove a tab, drag it off the ruler.

Printing a WordPad Document

Printing a document with WordPad is very easy. You can preview a document to see exactly how it will appear on the printed page before you actually print the document, which will save you time and paper. Choose File, Print Preview to preview a document. Figure 14.12 shows the Print Preview window.

FIG. 14.12 Save time and paper by previewing your document before you print it.

To zoom in for a close-up view of the document, click the magnifying glass on the area of the document you want to see up close or choose the Zoom In button. To zoom back out, click again or choose Zoom Out. Choose Close to close the Print Preview window.

To print a document, follow these steps:

1. Choose File, Print or click the Print button in the toolbar to display the Print dialog box (see Figure 14.13).

FIG. 14.13 Make your selections for printing a document in the Print dialog box.

2. Select a printer from the Name list.

After you make this selection, you will not have to do it again for printing other documents unless you want to change printers.

3.
In the Print Range box, indicate what you want to print:

Select All to print the entire document, or select Pages and specify a range of pages in the From and To text boxes. WordPad does not enable you to print a block of selected text.

4.
To print the document to a file instead of to a printer, select the Print to File box. When you start the print job, you will be prompted for a filename and location.

5.
Specify the number of copies you want to print in the Number of Copies box.

6.
Click OK.

FIG. 14.14 You can customize some of WordPad's default settings in the Options dialog box.

Changing WordPad Settings

You can change several of WordPad's default settings in the Options dialog box (shown in Figure 14.14). Your choices, available on each of the six tabs, include setting the measurement units, determining how word wrap operates, and presetting the toolbars that are displayed. To change any of these settings, choose View, Options, select the tab you want, make your selections, and click OK. 


Previous chapterNext chapterContents


© Copyright, Macmillan Computer Publishing. All rights reserved.