6.8 Moving Data Between DocumentsYou 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 PasteMost experienced PC users have learned to quickly trigger the Cut, Copy, and Paste commands from the keyboardwithout 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 EditCopy). Now switch to your email program and paste it into an outgoing message (right). 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 EditPaste), 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.
6.8.2 Drag-and-DropAs 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 documentinto a different window or program (right). NOTETo 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.
6.8.2.1 Drag-and-drop to the desktopFigure 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 icona 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). 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 pasteboardan area where you can temporarily stash pieces of text or graphics as you work.NOTEYou 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 availablealthough usually ignoredin 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:Create a document in a program that offers OLE features.Some programs that do: Excel, Word, WordPad, PowerPoint, and Paint.Click to indicate where you want the inserted object to appear. Choose InsertObject.(InsertObject 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.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/ImportWhen it comes to transferring large chunks of information from one program to anotherespecially address books, spreadsheet cells, and database recordsnone 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. |