This section simply covers how to "roll your own" if the AutoPilot approach doesn't suit your needs. (For more information, see Chapter 35, Creating and Modifying Data Sources , on page 871.) Note If you have problems completing any of these procedures, see How to Make It Work. Note To switch data sources later, see Switching to a Different Data Source for a Mail Merge Document on page 376. How to Make It Work Often, the document doesn't want to accept the fields you're dragging into itwhen your mouse moves over the document, the big black "Ghostbusters" symbol will appear and the field won't appear. To correct this, try one of the following before you drag in the fields: if one doesn't work, the other will. Approach A: Toggle the editability of the document Follow these steps. -
Save the document at least once. If the document hasn't been saved, the document will be untitled and the Edit File icon on the function bar at the top will be dimmed, as shown at right. -
If the document has been saved, the Edit File icon will look like this, at right. -
Then click the Edit File icon. The icon will appear flat now instead of recessed, as shown at right. -
Then click it again to make the file editable again; the icon will be recessed again, as shown at right. Approach B: Don't save the document Drag the fields into a new empty document and don't save it until all the fields are in. Approach C: Save the document first This is the opposite of Approach B, yes. Try it anyway; if A and B haven't work, C might. Dragging Data Source Fields Into a Document Dragging fields in is a really slick way to get the data you want. Just make sure you follow the guidelines in How to Make It Work or it won't. -
Open a document. -
Choose View > Data Sources. -
Expand the data source viewing list at the left and navigate to the data source and table you want to get data from, as shown in Figure 10-27. Figure 10-27. Viewing data source fields -
Select the first field you want to appear in the document, such as the first name , by clicking on the heading such as First and dragging the heading into the document (see Figure 10-28). Figure 10-28. Dragging database fields into a document for mail merge -
The field will appear in the document as shown in Figure 10-29. Figure 10-29. Result of dragging a data source field into your own document -
Drag in any additional fields. Make sure you put the correct spacing in between the fields, and the correct line breaks. Otherwise you'll end up with something like this in your document: ElaineNelson666AspenLaneBerthoudCO80022 To print what you've created, see Printing on page 399. Inserting Data Source Information as Text Instead of as Fields Linked to the Data Source Let's say you just want to send a friend your address book, and it's in a data source. Yo don't care if the document is linked back to the data source; you just want to send out the information. Here's how to do it. Inserting Data Sources as Plain Text If all you want to do is get some information from data sources into a regular ol' Writer document, here's how. -
Open a new Writer document. -
Choose View > Data Sources. -
Expand the data source viewing list at the left and navigate to the data source and table you want to get data from, as shown in Figure 10-30. Figure 10-30. Viewing data source fields -
Click the empty rectangle at the upper left corner as shown in Figure 10-31. Figure 10-31. Selecting the data in the data source viewer to drag to the document -
Drag the table into the document. The window in Figure 10-32 will appear. Make the appropriate entries and click OK. Figure 10-32. Choosing how to format data source data in a Writer document To print what you've created, just choose File > Print and print normally. Inserting Data Sources as Plain Text in a Table -
Open a new Writer document. -
Choose View > Data Sources. -
Expand the data source viewing list at the left and navigate to the data source and table you want to get data from. -
Click the empty rectangle at the upper left corner and drag it into the document. -
The window in Figure 10-33 will appear. Make the appropriate entries and click OK. Figure 10-33. Specifying the structure of the table to insert Figure 10-34 shows an inserted table; the AutoFormat button was used to apply the blue table format theme. Figure 10-34. A field created from inserting a data source You can print it directly without an extra step since the data is plain text, not fields. Figure 10-35. Finishing a document containing data source data To print, just choose File > Print and print normally. |