Sorting Records in a Merge


You can sort your records by one particular field by clicking the column heading button for the desired field in the Mail Merge Recipients dialog box (see step 2 in "Sorting and Editing the Data Source" earlier in this hour ). However, there may be times when a more complex sort is in order. Let's say, for example, that you want to sort your records in ZIP code order, within ZIP code by last name, and within last name by first name . Word lets you sort your data source on up to three fields, but you need to do so in the Filter and Sort dialog box, as described in these steps:

  1. If you're creating a new data source for your mail merge, stop when you have finished entering new addresses in the New Address List dialog box (see "Entering Records and Saving Your Data Source" earlier in this hour), and skip to step 3.

  2. If you're using an existing data source for your mail merge, when you reach the step where the Mail Merge Recipients dialog box appears, click the Edit button. A dialog box that looks exactly like the New Address List dialog box appears (see Figure 14.29). The dialog box title bar displays the path and filename of your data source.

    Figure 14.29. This dialog box is identical to the New Address List dialog box, except for the title bar.

    graphics/14fig29.jpg

  3. Click the Filter and Sort button to display the Filter and Sort dialog box, and click the Sort Records tab if it isn't already in front.

  4. Display the Sort By list, and click the field you want to use for the sort. To further refine the sort, display the first Then By list, and select the field you want to sort on when Word finds more than one record containing the same value in the first sort field. Then use the second Then By list to define a third field to sort on. In the example shown in Figure 14.30, Word will sort all the records by city, within the same city by last name, and within the same last name by first name. When you've defined the sort order, click the OK button to return to the previous dialog box.

    Figure 14.30. Use the Sort Records tab to define up to three levels on which to sort your records.

    graphics/14fig30.jpg

Your records will now be sorted in the order you specified. Continue with the mail merge process to run the merge.

graphics/bookpencil_icon.gif

The options you set in the Filter and Sort dialog box remain in effect until you clear them. So if you establish a particular sort order and then add records to the data source, Word automatically sorts the new records into the existing sort order when you next run a merge. To clear the sort order so that new records are not automatically sorted, display the Filter and Sort dialog box and click the Clear All button in the Sort tab. (A sort order that you set in the Mail Merge Recipients dialog box is automatically entered in the Filter and Sort dialog box, so you can clear it there as well.)




Sams Teach Yourself Microsoft Office Word 2003 in 24 Hours
Sams Teach Yourself Microsoft Office Word 2003 in 24 Hours
ISBN: 067232556X
EAN: 2147483647
Year: 2003
Pages: 315
Authors: Heidi Steele

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