6.8 Moving Data Between Documents


You can't paste a picture into your Web browser, and you can't paste MIDI music information into your word processor. But you can put graphics into your word processor, paste movies into your database, insert text into Photoshop, and combine a surprising variety of seemingly dissimilar kinds of data. And you can transfer text from Web pages, email messages, and word processing documents to other email and word processing files; in fact, that's one of the most frequently performed tasks in all of computing.

6.8.1 Cut, Copy, and Paste

Most experienced PC users have learned to quickly trigger the Cut, Copy, and Paste commands from the keyboard ”without even thinking. Figure 6-4 provides a recap.

Figure 6-4. Suppose you want to email some text on a Web page to a friend. Left: Start by dragging through it and then choosing Copy from the shortcut menu (or choosing Edit Copy). Now switch to your email program and paste it into an outgoing message (right).
figs/06fig04.gif

Bear in mind that you can cut and copy highlighted material in any of three ways: First, you can use the Cut and Copy commands in the Edit menu; second, you can press Ctrl+X (for Cut) or Ctrl+C (for Copy); and third, you can right-click the highlighted material and choose Cut or Copy from the shortcut menu.

When you do so, the PC memorizes the highlighted material, socking it away on an invisible storage pad called the Clipboard. If you choose Copy, nothing visible happens; if you choose Cut, the highlighted material disappears from the original document.

At this point, you must take it on faith that the Cut or Copy command actually worked. ( Windows XP no longer automatically pops open the Clipboard Viewer, as did previous Windows versions.)

Pasting copied or cut material, once again, is something you can do either from a menu (choose Edit Paste), by right-clicking and choosing Paste from the shortcut menu, or from the keyboard (press Ctrl+V).

The most recently cut or copied material remains on your Clipboard even after you paste, making it possible to paste the same blob repeatedly. Such a trick can be useful when, for example, you've designed a business card in your drawing program and want to duplicate it enough times to fill a letter- sized printout. On the other hand, whenever you next copy or cut something, whatever was previously on the Clipboard is lost forever.

POWER USERS' CLINIC
ClipBook Viewer: The Missing Manual

The ClipBook Viewer of previous Windows versions is still available in Windows XP Pro; it's just hidden. To open it, choose Start Run, type Clipbrd.exe, then press Enter.

As you cut or copy information (from a word processor, Web page, or whatever), it shows up in the Clipboard window within the ClipBook Viewer. Normally, cutting or copying anything new replaces what was on the Clipboard before ”but that's where the ClipBook Viewer comes into play. It lets you save the current Clipboard contents for re-use later.


figs/06inf04.gif

The instructions depend on what kind of network you're on (if at all); here goes:

Domain networks : Once ClipBook Viewer is open, choose Window Local ClipBook window, and then choose Edit Paste. When the Paste dialog box appears, type a name for the page of information stored in the Clipboard. Click OK to save this information to a file. You can go on with your work this way, pasting and saving each newly copied scrap of text.

Workgroup networks (or no network) : In ClipBook Viewer, choose File Save As. Name and save the scrap of information you've copied, and then click Save. You can save as many files as you want and then retrieve then later (as long as you remember the name of the folder where you stored them).

Of course, the purpose of saving them isn't just to give your fingers some exercise; the whole point is to retrieve them later to use in your documents. Here again, the instructions vary.

Domain networks : Bring the Local ClipBook window to the front again. If a list of your file names doesn't appear in this window, click View Table of Contents. Double-click the file name you need. Make sure that the text or graphic is the one you're looking for, and then choose Edit Copy. Voil  ! You've put the information from the Local ClipBook window back into the Clipboard window, ready for pasting into a document just as you normally would (using Ctrl+V, right-clicking anywhere within your document and then selecting Paste from the shortcut menu, or choosing Edit Paste).

Workgroup networks (or no network) : In the ClipBook Viewer, choose File Open. Locate the scrap you saved earlier, open it, and OK the vaporization of the current clipboard. Switch back into any other program; you're ready to paste the retrieved material.


6.8.2 Drag-and-Drop

As useful and popular as it is, the Copy/Paste routine doesn't win any awards for speed; after all, it requires four steps. In many cases, you can replace that routine with the far more direct (and enjoyable) drag-and-drop method. Figure 6-5 illustrates how it works.

Figure 6-5. Click in the middle of some highlighted text (left) and drag it into another place within the document ”into a different window or program (right).
figs/06fig05.gif

NOTE

To drag highlighted material offscreen , drag the cursor until it approaches the top or bottom edge of the window. The document scrolls automatically; as you approach the destination, jerk the mouse away from the edge of the window to stop the scrolling.

FREQUENTLY ASKED QUESTION
When Formatting Is Lost

How come pasted text doesn't always look the same as what I copied?

When you copy text from Internet Explorer, for example, and then paste it into another program, such as Word, you may be alarmed to note that the formatting of that text (bold, italic, font size, font color , and so on) doesn't reappear intact. In fact, the pasted material may not even inherit the current font settings in the word processor. There could be several reasons for this problem.

For example, not every program offers text formatting ”Notepad among them. And the Copy command in some programs (such as Web browsers) doesn't pick up the formatting along with the text. So when you copy something from Internet Explorer and paste it into Word or WordPad, you may get plain unformatted text. (There is some good news along these lines, however. Word XP maintains formatting pasted from the latest Internet Explorer.)

Finally, a note on text wrapping. Thanks to limitations built into the architecture of the Internet, email messages aren't like word processor documents. The text doesn't flow continuously from one line of a paragraph to the next, such that it reflows when you adjust the window size. Instead, email programs insert a press of the Enter key at the end of each line within a paragraph.

Most of the time, you don't even notice that your messages consist of dozens of one-line "paragraphs"; when you see them in the email program, you can't tell the difference. But if you paste an email message into a word processor, the difference becomes painfully apparent ” especially if you then attempt to adjust the margins.

To fix the text, delete the invisible carriage return at the end of each line. (Veteran PC users sometimes use the word processor's search-and-replace function for this purpose.) Or, if you just need a quick look, reduce the point size (or widen the margin) until the text no longer wraps.


Several of the built-in Windows XP programs work with the drag-and-drop technique, including WordPad and Outlook Express. Most popular commercial programs offer the drag-and-drop feature, too, including email programs and word processors, America Online, Microsoft Office programs, and so on.

As illustrated in Figure 6-5, drag-and-drop is ideal for transferring material between windows or between programs. It's especially useful when you've already copied something valuable to your Clipboard, since drag-and-drop doesn't involve (and doesn't erase) the Clipboard.

Its most popular use, however, is rearranging the text in a single document. In, say, Word or WordPad, you can rearrange entire sections, paragraphs, sentences, or even individual letters , just by dragging them ”a terrific editing technique.

NOTE

Using drag-and-drop to move highlighted text within a document also deletes the text from its original location. By pressing Ctrl as you drag, however, you make a copy of the highlighted text.

6.8.2.1 Drag-and-drop to the desktop

Figure 6-6 demonstrates how to drag text or graphics out of your document windows and directly onto the desktop. There your dragged material becomes an icon ”a Scrap file .

Figure 6-6. A Scrap file will appear when you drag material out of the document window and onto the desktop. Its icon depends on the kind of material contained within, as shown here at left. You can view a clipping just by double-clicking it, so that it opens into its own window (right).
figs/06fig06.gif

When you drag a clipping from your desktop back into an application window, the material in that clipping reappears. Drag-and-drop, in other words, is a convenient and powerful feature; it lets you treat your desktop itself as a giant, computer-wide pasteboard ”an area where you can temporarily stash pieces of text or graphics as you work.

NOTE

You can drag a Scrap file onto a document's taskbar button, too. Don't release the mouse button yet. In a moment, the corresponding document window appears, so that you can continue your dragging operation until the cursor points to where you want the Scrap file to appear. Now release the mouse; the Scrap material appears in the document.

In Microsoft Office applications, this works with entire document icons, too. You can drag one Word file into another's window to insert its contents there.

6.8.3 Insert Object (OLE)

Here's yet another relative of the Copy and Paste duo: the Insert Object command, which is available ”although usually ignored ”in many Windows programs. (You may hear it referred to as Object Linking and Embedding technology, or OLE, or even "oh-LAY.")

Using this feature, you can insert material from one OLE-compatible program (like Paint) into a document running in another (like Word). When you click the painting, in this example, Word's menus change to those of the campaign program, so that you can edit the graphic. When you click off the graphic, the familiar Word menus return.

In general, OLE never became the hit that Microsoft hoped, probably because it can be flaky if you don't have a fast machine with a lot of memory. Still, if the idea of self-updating inserted material intrigues you, here's how to try it:

  1. Create a document in a program that offers OLE features.

    Some programs that do: Excel, Word, WordPad, PowerPoint, and Paint.

  2. Click to indicate where you want the inserted object to appear. Choose Insert Object.

    (Insert Object is the menu wording in Microsoft Office programs; its location may differ in other programs.)

    Now an Object dialog box appears, offering two tabs: Create New, which creates a new graph, picture, spreadsheet, or other embedded element; and Create from File, which imports a document you've already created (using, for example, Excel, Paint, Graph, or Imaging).

    If you choose Create from File, a "Link to file" checkbox appears (Figure 6-7). It determines whether the inserted material will be embedded or (if you turn on the checkbox) linked. If you choose to link the inserted material, the fun begins. Now you can make changes in the original document and watch the revision appear automatically in any documents to which it's been linked.

    Figure 6-7. Top: You can insert many kinds of "objects" into a Word or WordPad document: a Paint file ("Bitmap Image"), Image Document (something you've scanned), an Excel spreadsheet ("Worksheet"), and so on. Bottom: You may prefer to slap an entire existing file into the middle of the one you're now editing. Do that using the Create from File tab. Turn on "Link to file" if you want the data to update itself when the source file is edited separately.
    figs/06fig07.gif
  3. Choose the kind of data you want to create, and click OK.

    You've successfully embedded or linked new information. To edit the document, just double-click it; the menus and palettes you need to modify this info reappear. (If you're linked to a separate document, double-clicking the embedded object actually opens that other document.)

6.8.4 Export/Import

When it comes to transferring large chunks of information from one program to another ”especially address books, spreadsheet cells , and database records ”none of the data-transfer methods described so far in this chapter do the trick. For these purposes, use the Export and Import commands found in the File menu of almost every database, spreadsheet, email, and address-book program.

These Export/Import commands aren't part of Windows, so the manuals or help screens of the applications in question should be your source for instructions. For now, however, the power and convenience of this feature are worth noting: Because of these commands, your four years ' worth of collected names and addresses in, say, an old address-book program can find its way into a newer program, such as Palm Desktop, in a matter of minutes.



Windows XP Pro. The Missing Manual
Windows XP Pro: The Missing Manual
ISBN: 0596008988
EAN: 2147483647
Year: 2003
Pages: 230

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net