home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _C532812CF7134A4AAB3B6C42B8BBFC7C < prev    next >
Text File  |  2003-03-07  |  39KB  |  1,190 lines

  1. Merging documents
  2.  
  3. When you perform a merge, you combine a form document and a data source to form a new series of documents. The merge reproduces copies of the form document, with each copy containing information from a specific record in the data source.
  4.  
  5. In this section, you'll learn about
  6.  
  7.   creating data for a merge
  8.   
  9.   working with form documents for a merge
  10.   
  11.   associating merge files
  12.   
  13.   performing a merge
  14.   
  15.   converting merge files
  16.   
  17.   sorting, viewing, and finding data in data files
  18.   
  19.   editing merge data files
  20.   
  21.   selecting specific data for merges
  22.   
  23.   merging with address books
  24.   
  25.   changing merge options
  26.   
  27.   using merge commands
  28.   
  29. You can program a merge by adding merge commands. For more information, see Reference: The Merge toolbar and programming commands in the online Help.
  30.  
  31. Creating data for a merge
  32.  
  33. When you merge documents, you produce copies of a form document. Each copy contains specific information from a record in a data source, such as a data file, an address book, or keyboard input.
  34.  
  35. When you use a WordPerfect data file as the data source, you can create either a data text file or a data table file. In both types of data files, information is organized into records and fields. For example, a record may include a name, address, telephone number, and other contact information. Each item within the record, for example, name and address, is recognized as a field. It is recommended that you use no more than 512 fields per record.
  36.  
  37. When you create a data text file, each field is marked by the ENDFIELD code and each record by the ENDRECORD code. The following graphic shows a data text file containing 1) ENDFIELD codes and 2) ENDRECORD codes.
  38.  
  39. When you create a data table file, fields and records are arranged in columns and rows. Each column contains a field. Each row contains a record. The following graphic shows a data table file containing 1) records, 2) fields, and 3) field names.
  40.  
  41. You can retrieve data from other file formats and use them as data files in WordPerfect. For example, you can retrieve and convert a database file, a spreadsheet file, an ODBC data source, or a text file. For information about converting files, see "Opening and previewing files."
  42.  
  43. You can also use an address book as a merge data source. For information, see "Merging with address books."
  44.  
  45. When you create a data file, WordPerfect automatically inserts a Merge toolbar into the merge data file. For more information about the Merge toolbar, see "Using the Merge toolbar."
  46.  
  47. To create a data file for a merge
  48.  
  49. 1    Click Tools  Merge.
  50.  
  51. 2    Click Data source  Create data file.
  52.  
  53. If you have typed in the active document, enable one of the following options in the Data File Source dialog box:
  54.  
  55.   Use file in the active window-uses the active document
  56.   
  57.   New document window-creates a new document
  58.   
  59. 3    Click OK.
  60.  
  61. 4    Type the name of a field in the Name a field box.
  62.  
  63. If you want to create a data table file, enable the Format records in a table check box.
  64.  
  65. 5    Click Add.
  66.  
  67. 6    Click any of the following to organize a selected field:
  68.  
  69.   Replace-replaces the name of the selected field
  70.   
  71.   Delete-deletes the selected field
  72.   
  73.   Move up-moves the selected field up in the Fields used in merge list
  74.   
  75.   Move down-moves the selected field down in the Fields used in merge list
  76.   
  77. 7    Click OK.
  78.  
  79. 8    In the Create or edit data in record area, type the data for each record.
  80.  
  81. 9    Click Close, and click Yes.
  82.  
  83.  
  84.  
  85. You can also    
  86.  
  87. Number the fields in an empty data file    Click OK in the Create data file dialog box. Specify the number of fields in the Number of fields in each record box.
  88.  
  89.  
  90.  
  91. Note
  92.  
  93.   It is recommended that you use no more than 512 fields per record.
  94.   
  95. Tips
  96.  
  97.   To add a line to a field, press Ctrl + Enter.
  98.   
  99.   Press Tab to move to the next field.
  100.   
  101. Working with form documents for a merge
  102.  
  103. A form document provides the pattern and layout for a merged document. It can contain text, formatting, graphics, and merge commands. You create form documents the same way you create regular documents; however, instead of typing specific information, you insert a command which can be replaced by information from a data source when you perform the merge. For more information about inserting merge commands, see "Using merge commands."
  104.  
  105. The following graphic shows a form document containing 1) FIELD codes where the name and address of the recipient are inserted and 2) text for a letter.
  106.  
  107. At the top of the document window, WordPerfect inserts the Merge toolbar to give you greater control over a merge. For more information about the Merge toolbar, see "Using the Merge toolbar."
  108.  
  109. You can create a form document for labels and merged text that is oriented sideways. WordPerfect also lets you create a form document that you can personalize during a keyboard merge. A keyboard merge lets you enter information into the form document each time you need to send it. For more information about the KEYBOARD command, see Merge programming commands. in the online Help.
  110.  
  111. If you do not want to create a new series of merged documents, you can send all of the merged data to a table. After you perform the merge, all of the merged output will be formatted into a single table with each column representing a field.
  112.  
  113. To create a form document for a merge
  114.  
  115. 1    Click Tools  Merge.
  116.  
  117. 2    Click Form document  Create form document.
  118.  
  119. If you have typed in the active document, enable one of the following options:
  120.  
  121.   Use file in active window-uses the active document
  122.   
  123.   New document window-creates a new document
  124.   
  125. 3    Click OK.
  126.  
  127. 4    Enable one of the following:
  128.  
  129.   Associate a data file-specifies the path and filename for the file
  130.   
  131.   Associate an address book-specifies an address book
  132.   
  133.   Associate an ODBC data source-lets you select the ODBC source to use
  134.   
  135.   No association-does not associate any data file
  136.   
  137. 5    Type text, and insert merge commands in the form document.
  138.  
  139. 6    Insert fields in the form document.
  140.  
  141. Notes
  142.  
  143.   For information about inserting merge commands, see "To insert a merge command."
  144.   
  145.   For information about inserting fields, see "To insert a field in a form document for a merge."
  146.   
  147. To insert a field in a form document for a merge
  148.  
  149. 1    Click Insert field on the Merge toolbar.
  150.  
  151. 2    Click where you want data to be filled in from a data source.
  152.  
  153. 3    In the Field box, specify the field.
  154.  
  155. 4    Click Insert.
  156.  
  157. To create labels for a merge
  158.  
  159. 1    Click Tools  Merge.
  160.  
  161. 2    Click Form document  Create form document.
  162.  
  163. If you have typed in the current document, enable one of the following options:
  164.  
  165.   Use file in active window-uses the active document
  166.   
  167.   New document window-creates a new document
  168.   
  169. 3    In the Associate form and data dialog box, enable the Associate an address book option, and choose an address book from the list box.
  170.  
  171. 4    Click OK.
  172.  
  173. 5    Click Format  Labels on the WordPerfect menu bar.
  174.  
  175. 6    In the List labels for area, enable one of the following label options:
  176.  
  177.   Laser printed-displays laser label options
  178.   
  179.   Tractor-fed-displays tractor-fed label options
  180.   
  181.   Both-displays laser and tractor-fed label options
  182.   
  183. 7    Choose a label style from the Labels list, and click Select.
  184.  
  185. 8    Insert fields in the form document.
  186.  
  187. Notes
  188.  
  189.   For information about inserting fields, see "To insert a field in a form document for a merge."
  190.   
  191.   You can merge selected records from an address book. For information, see "To merge selected records from an address book."
  192.   
  193. To create sideways text for a merge
  194.  
  195. 1    Click Tools  Merge.
  196.  
  197. 2    Click Form document  Create form document.
  198.  
  199. If you have typed in the active document, enable one of the following options:
  200.  
  201.   Use file in active window-uses the active document
  202.   
  203.   New document window-creates a new document
  204.   
  205. 3    Click OK.
  206.  
  207. 4    Click one of the following options:
  208.  
  209.   Associate a data file-specifies the path and filename for the associated data file
  210.   
  211.   Associate an address book-specifies an address book
  212.   
  213.   Associate an ODBC data source-lets you select the ODBC source
  214.   
  215.   No association-does not associate any data file
  216.   
  217. 5    Click OK.
  218.  
  219. 6    Click Insert  Text box on the WordPerfect menu bar.
  220.  
  221. 7    Insert fields in the form document, and click Close.
  222.  
  223. 8    Select the text box.
  224.  
  225. 9    Right-click the text box, and click Content.
  226.  
  227. 10     Enable a rotation option in the Rotate text counterclockwise area.
  228.  
  229. Note
  230.  
  231.   For information about inserting fields, see "To insert a field in a form document for a merge."
  232.   
  233. To create a form document for a keyboard merge
  234.  
  235. 1    Click Tools  Merge.
  236.  
  237. 2    Click Form document  Create form document.
  238.  
  239. If you have typed in the active document, enable one of the following options:
  240.  
  241.   Use file in active window-uses the active document
  242.   
  243.   New document window-creates a new document
  244.   
  245. 3    Click OK.
  246.  
  247. 4    Enable one of the following options:
  248.  
  249.   Associate a data file-specifies a path and filename for the associated data file
  250.   
  251.   Associate an address book-specifies an address book
  252.   
  253.   Associate an ODBC data source-lets you select the ODBC source
  254.   
  255.   No association-does not associate any data file
  256.   
  257. 5    Click OK.
  258.  
  259. 6    Click where you want to insert a keyboard prompt.
  260.  
  261. 7    On the Merge toolbar, click Insert merge code, and choose Keyboard.
  262.  
  263. 8    Type a user prompt for the information to be entered.
  264.  
  265. To create a table for a merge
  266.  
  267. 1    Click Tools  Merge.
  268.  
  269. 2    Click Form document  Create form document.
  270.  
  271. If you have typed in the active document, enable one of the following options:
  272.  
  273.   Use file in active window-uses the active document
  274.   
  275.   New document window-creates a new document
  276.   
  277. 3    Enable one of the following options:
  278.  
  279.   Associate a data file-specifies the path and filename for the associated data file
  280.   
  281.   Associate an address book-specifies an address book
  282.   
  283.   Associate an ODBC data source-lets you select the ODBC source
  284.   
  285.   No association-does not associate any data file
  286.   
  287. 4    Click Table  Create on the WordPerfect menu bar.
  288.  
  289. 5    Type the specified values in the following boxes:
  290.  
  291.   Columns-number of columns
  292.   
  293.   Rows-2
  294.   
  295. 6    Click Create, and type a heading in each cell of the first row.
  296.  
  297. 7    Right-click the table, click Format, and click the Table tab.
  298.  
  299. 8    Enable the Insert new rows automatically check box, and click OK.
  300.  
  301. 9    Insert fields in the second row of the table, and click Close.
  302.  
  303. 10    Click at the end of the last cell in the second row, and click Insert merge code on the Merge toolbar.
  304.  
  305. Choose REPEATROW from the Merge codes list; click Insert; and click Close.
  306.  
  307. Note
  308.  
  309.   After merging, the table expands one row for each record in the associated data file.
  310.   
  311. Tip
  312.  
  313.   Press Tab to move to the next cell.
  314.   
  315. Associating merge files
  316.  
  317. When you merge documents, you must link the name of a data source to a form document. This is called associating a data source. You can associate a data source with a form document, or you can associate a form document with a data file, such as an ODBC data source. The association is always stored in the form document.
  318.  
  319. If the data source changes, you can associate a different data file. You can also go to an associated form document from its data file or to an associated data file from its form document.
  320.  
  321. To associate a data file with a form document
  322.  
  323. 1    Open a data file.
  324.  
  325. 2    Click Go to form on the Merge toolbar.
  326.  
  327. 3    Click one of the following:
  328.  
  329.   Select-associates an existing form document
  330.   
  331.   Create-creates a new form document
  332.   
  333. Note
  334.  
  335.   The association is stored in the form document.
  336.   
  337. To associate a form document with a data source
  338.  
  339. 1    Open a form document that has no association with a data source.
  340.  
  341. 2    Click Go to data on the Merge toolbar.
  342.  
  343. 3    Click one of the following:
  344.  
  345.   Select-associates a data file
  346.   
  347.   Create-creates and names a new data file or form file
  348.   
  349.   Address book-associates an address book
  350.   
  351.   ODBC-associates a ODBC data source
  352.   
  353. Note
  354.  
  355.   For information about associating an ODBC data source, see "To associate a form document with an ODBC data source."
  356.   
  357. To associate a form document with an ODBC data source
  358.  
  359. 1    Open a form document that has no association with a data source.
  360.  
  361. 2    Click Go to data on the Merge toolbar.
  362.  
  363. 3    Click ODBC.
  364.  
  365. If prompted, log in to the database.
  366.  
  367. 4    Choose a location from the Data source list box.
  368.  
  369. 5    From the Table list box, choose a table in the database that contains the merge data.
  370.  
  371. Note
  372.  
  373.   For more information about logging in to an ODBC database, see the online Help for the Microsoft SQL Server ODBC driver.
  374.   
  375. To go to the associated data file
  376.  
  377. 1    Open a form document.
  378.  
  379. 2    On the Merge toolbar, click Go to data.
  380.  
  381. Note
  382.  
  383.   If there is no associated data file, you can select an existing data file or create a new one. For information about associating a data source, see "To associate a form document with a data source." For information about creating a data file, see "To create a data file for a merge."
  384.   
  385. To go to the associated form document
  386.  
  387. 1    Open a data file.
  388.  
  389. 2    On the Merge toolbar, click Go to form.
  390.  
  391. Notes
  392.  
  393.   The associated form document must be open.
  394.   
  395.   The association is stored in the form document.
  396.   
  397. To change the associated data source
  398.  
  399. 1    Open a form document.
  400.  
  401. 2    Click Insert field on the Merge toolbar.
  402.  
  403. 3    Click Data source, and click a data file.
  404.  
  405. Performing a merge
  406.  
  407. When you perform a merge, you combine a form document and a data source to create a new series of documents. WordPerfect provides a variety of output options for the new documents. For example, you can save it to disk, print it, or add it to the active document. The following image shows 1) a data source document, 2) a form document, and 3) merged documents.
  408.  
  409. You can perform a keyboard merge and add information at the time of the merge. When you perform the keyboard merge, WordPerfect pauses the merge as specified in the form document and waits for you to enter information from the keyboard.
  410.  
  411. You can create envelopes as you merge a form document (such as a letter), or you can create merged envelopes on their own. An envelope is created for each record selected in the data source. For more information about working with envelopes, see "Creating envelopes."
  412.  
  413. You can also send each merged document as email.
  414.  
  415. Please note that it is recommended that you use no more than 512 fields per record.
  416.  
  417. To perform a merge
  418.  
  419. 1    Click Tools  Merge.
  420.  
  421. 2    Click Form document, and choose the location of the form file to merge.
  422.  
  423. 3    Click Data source, and choose the location of the data file to merge.
  424.  
  425. 4    Click Output, and choose one of the following:
  426.  
  427.   Current document
  428.   
  429.   New document
  430.   
  431.   Printer
  432.   
  433. 5    Click Merge.
  434.  
  435.  
  436.  
  437. You can also    
  438.  
  439. Stop a merge in progress    Press ESC.
  440.  
  441. Save the merged file to disk    Click Output  File on disk. Choose the folder, drive, and where you want to save the file. Type a filename in the Filename list box. Click Select.
  442.  
  443.  
  444.  
  445. Tip
  446.  
  447.   You can also perform a keyboard merge by clicking Merge on the Merge toolbar. For more information about using the Merge toolbar, see "Using the Merge toolbar."
  448.   
  449. To merge to envelopes
  450.  
  451. 1    Click Tools  Merge.
  452.  
  453. 2    Click Form document, and choose the location of the form document.
  454.  
  455. If you are merging envelopes only, click Current document as the location of the form file.
  456.  
  457. 3    Click Data source, and choose the location of the data file.
  458.  
  459. 4    Click Envelopes.
  460.  
  461. 5    Insert fields in the form document.
  462.  
  463. 6    Click Close.
  464.  
  465. 7    Click Continue merge on the Merge toolbar.
  466.  
  467. 8    Click Output, and choose a location for the merged file.
  468.  
  469. Notes
  470.  
  471.   The merged envelopes are placed at the end of the merged file.
  472.   
  473.   If there is an existing envelope for this document, you can edit, cancel, or define the envelope. For more information about creating envelopes, see "Creating envelopes."
  474.   
  475. To perform a keyboard merge
  476.  
  477. 1    Open a form or data file containing the KEYBOARD merge command.
  478.  
  479. 2    Click Tools  Merge.
  480.  
  481. 3    Click Form document, and choose the location of the form file.
  482.  
  483. 4    Click Data source, and choose the location of the data file.
  484.  
  485. 5    Click Output, and choose a location for the merged file.
  486.  
  487. 6    Click Merge.
  488.  
  489. 7    When the merge pauses at the KEYBOARD command, type the information as prompted.
  490.  
  491. 8    Click Continue merge on the Merge toolbar.
  492.  
  493.  
  494.  
  495. You can also    
  496.  
  497. Skip a record    Review the data in the Next record list box on the Merge toolbar. Click Skip next record.
  498.  
  499. Stop a keyboard merge    Click Stop on the Merge toolbar.
  500.  
  501.  
  502.  
  503. Tip
  504.  
  505.   To continue the merge to the end of the active record and ignore all other merge commands, click Quit on the Merge toolbar.
  506.   
  507. To merge to e-mail
  508.  
  509. 1    Click Tools  Merge.
  510.  
  511. 2    Click Form document, and choose the location of the form file to merge.
  512.  
  513. 3    Click Data source, and choose the location of the data file to merge.
  514.  
  515. 4    Click Output, and choose E-mail.
  516.  
  517. 5    Choose the field containing the email address from the Select field name of e-mail address list box.
  518.  
  519. 6    In the Subject line box, type the subject line for the merged email message.
  520.  
  521. 7    Click OK.
  522.  
  523. 8    Click Merge.
  524.  
  525. 9    Choose a profile from the Profile name list box.
  526.  
  527. Converting merge files
  528.  
  529. You can convert form documents and data files to regular WordPerfect documents. When a file is converted, it is no longer recognized as a form document or a data file for a merge, and the Merge toolbar is removed. For information about the Merge toolbar, see "Using the Merge toolbar." You can also convert a table to a data text file.
  530.  
  531. When you use a data file that is not formatted for a merge, WordPerfect imports and converts it for the merge. You can use the file one time and not save it as a merge file, or you can save the file in WordPerfect format so that you can use it again.
  532.  
  533. You can also import data in other forms, such as a spreadsheet, database, or text file, into a data text file for a merge. For more information, see "To link or embed spreadsheet data as regular text," "To link or embed a database as regular text," and "To link or embed a delimited text file."
  534.  
  535. It is recommended that you use no more than 512 fields per record.
  536.  
  537. To convert a form document or data file to a regular document
  538.  
  539. 1    Open a data file or a form document.
  540.  
  541. 2    On the Merge toolbar, click Options, and choose Remove merge bar.
  542.  
  543. One of the following dialog boxes displays:
  544.  
  545.   The file will not be recognized as a merge file-indicates that the active file will not be recognized as a merge form document or merge data file
  546.   
  547.   Data file association will be lost-indicates that the active file will not be recognized as a merge form document and will not be associated with any data file
  548.   
  549. Note
  550.  
  551.   After the Merge toolbar has been removed, you cannot click Undo to display it again. You need to re-create the merge file.
  552.   
  553. To convert a table to a data text file for a merge
  554.  
  555. 1    Select a table.
  556.  
  557. 2    Press BACKSPACE.
  558.  
  559. 3    Enable the Convert table contents option.
  560.  
  561. 4    Click OK.
  562.  
  563. 5    Enable the Convert text to merge data file (.dat) option.
  564.  
  565. If you want to convert the cells in the first row to field names, enable the Use text as first row as field names check box.
  566.  
  567. Sorting, viewing, and finding data in data files
  568.  
  569. You can sort a data file. Using the Quick data entry feature in WordPerfect, you can scroll through the records and fields in a data file to view them. You can also find records that contain specific text.
  570.  
  571. To sort a data file
  572.  
  573. 1    On the Merge toolbar, click Options, and choose Sort.
  574.  
  575. 2    Choose a criteria from the Sort by box.
  576.  
  577. 3    Click Sort.
  578.  
  579. The table is sorted alphabetically or numerically in ascending order based on the first cell in each row.
  580.  
  581. Note
  582.  
  583.   For more information about sorting records, see "Working with records."
  584.   
  585. To view records in a data file using Quick data entry
  586.  
  587. 1    Click Quick entry on the Merge toolbar.
  588.  
  589. 2    Click one of the following:
  590.  
  591.   First
  592.   
  593.   Previous
  594.   
  595.   Next
  596.   
  597.   Last
  598.   
  599. 3    Click Close.
  600.  
  601. To view a field in a data file using Quick data entry
  602.  
  603. 1    Click Quick entry on the Merge toolbar.
  604.  
  605. 2    Click any of the following:
  606.  
  607.   Next field-moves the cursor to the next field
  608.   
  609.   Previous field-moves the cursor to the previous field
  610.   
  611. To find text in a data file using Quick data entry
  612.  
  613. 1    Click Quick entry on the Merge toolbar.
  614.  
  615. 2    Click Find, and type the text to match in the Find box.
  616.  
  617. 3    Click one of the following:
  618.  
  619.   Find next-moves to the next record containing the text specified
  620.   
  621.   Find previous-moves to the previous record containing the text specified
  622.   
  623. Notes
  624.  
  625.   Depending on which record is displayed, Find next or Find previous may be grayed.
  626.   
  627.   If no record is found, the first record in the data file displays.
  628.   
  629. Editing merge data files
  630.  
  631. A data file organizes data for a merge into fields and records. There are different ways to edit a data file depending on how the data file is formatted. A data file can be formatted as either a data text file or a data table file. In a data table file, information is organized in a table. Each column of the table contains a field, and each row contains a record. You can add and delete columns and rows from a data table.
  632.  
  633. In a data text file, fields are separated by an ENDFIELD code. Records are separated by an ENDRECORD code and a hard page break. WordPerfect lets you add fields to and delete fields from records. You can also add field names and records to data text files.
  634.  
  635. Using Quick data entry, you can add and delete fields or records in both data text files and data table files. You can also edit the contents of fields in records.
  636.  
  637. It is recommended that you use no more than 512 fields per record.
  638.  
  639. To add a column to a data table
  640.  
  641. 1    Click in a column next to where you want to add a new column.
  642.  
  643. 2    On the Merge toolbar, click Column, and choose Insert.
  644.  
  645. 3    Type the name of the new field in the Field name box.
  646.  
  647. 4    Click one of the following:
  648.  
  649.   Before current field-inserts the new field before the selected column
  650.   
  651.   After current field-inserts the new field after the selected column
  652.   
  653.   After last field-inserts the new field as the last column in the table
  654.   
  655. Note
  656.  
  657.   It is recommended that you use no more than 512 fields per record.
  658.   
  659. To delete a column from a data table
  660.  
  661. 1    Click in a column.
  662.  
  663. 2    Click Column on the Merge toolbar.
  664.  
  665. 3    Choose DELETE.
  666.  
  667. To add a row to a data table
  668.  
  669. 1    Click in a row next to where you want to add a new row.
  670.  
  671. 2    On the Merge toolbar, click Row, and choose Insert.
  672.  
  673. 3    Click one of the following:
  674.  
  675.   Add row above current row
  676.   
  677.   Add row below current row
  678.   
  679.   Add row to end of table
  680.   
  681. To delete a row from a data table
  682.  
  683. 1    Click in a row.
  684.  
  685. 2    On the Merge toolbar, click Row and choose Delete.
  686.  
  687. To add or delete a field from a data text file record
  688.  
  689.  
  690.  
  691. To    Do the following
  692.  
  693. Add a field    Click where you want to add the field. Type data, and click End field on the Merge toolbar.
  694.  
  695. Delete a field    Select the text and the ENDFIELD merge code. Press DELETE.
  696.  
  697.  
  698.  
  699. Note
  700.  
  701.   It is recommended that you use no more than 512 fields per record.
  702.   
  703. To add or delete a field name from a data text file
  704.  
  705.  
  706.  
  707. To    Do the following
  708.  
  709. Add a field name    Click where you want to add a field. The cursor must be within the parentheses of the Fieldnames code.
  710.  
  711. Type the new field name followed by a semicolon.
  712.  
  713. Delete a field name    Click within the parentheses of the Fieldnames code. Select the field name and following semicolon. Press DELETE.
  714.  
  715.  
  716.  
  717. Notes
  718.  
  719.   A semicolon, but no spaces, separates each field name.
  720.   
  721.   You need to manually add or delete fields from records. For information, see "To add or delete a field from a data text file record."
  722.   
  723.   It is recommended that you use no more than 512 fields per record.
  724.   
  725. To add a record to a data text file
  726.  
  727. 1    Type the text for the first field.
  728.  
  729. 2    Click End field on the Merge toolbar.
  730.  
  731. 3    Click after the last ENDFIELD code of the record.
  732.  
  733. 4    Click End record on the Merge toolbar.
  734.  
  735.  
  736.  
  737. You can also    
  738.  
  739. Delete a record from a data text file    Select the record, including the ENDFIELD and ENDRECORD codes and the hard page break at the end of the record. Press DELETE.
  740.  
  741. Print a data text file    Click Tools  Merge. On the Merge toolbar, click Options, and choose Print.
  742.  
  743.  
  744.  
  745. To add a field to a data file using Quick data entry
  746.  
  747. 1    Click Quick Entry on the Merge toolbar.
  748.  
  749. 2    Click Field names.
  750.  
  751. 3    Type the field name in the Field name box.
  752.  
  753. 4    Click one of the following:
  754.  
  755.   Add-adds the new field after the selected field
  756.   
  757.   Add before-adds the new field before the selected field
  758.   
  759.  
  760.  
  761. You can also    
  762.  
  763. Replace a field name in a data file    Choose a field from the Fields used in merge list box. Click Replace.
  764.  
  765. Delete a field from a data file    Choose a field from the Fields used in merge list box. Click Delete.
  766.  
  767.  
  768.  
  769. Notes
  770.  
  771.   If you replace a field name, information in that field will be deleted from each record in the data file. For example, if you replace "Address" with "Street Address," all data in the "Address" field in all records will be deleted.
  772.   
  773.   If you delete a field name, information in that field will be deleted from each record in the data file.
  774.   
  775.   It is recommended that you use no more than 512 fields per record.
  776.   
  777. To add a record to a data file using Quick data entry
  778.  
  779. 1    Click Quick entry on the Merge toolbar.
  780.  
  781. 2    Click New record.
  782.  
  783. 3    Type the data for a field.
  784.  
  785. 4    Click Close.
  786.  
  787.  
  788.  
  789. You can also    
  790.  
  791. Delete the displayed record    Click Delete record.
  792.  
  793.  
  794.  
  795. Tip
  796.  
  797.   Press Enter to move to the next field.
  798.   
  799. To edit fields using Quick data entry
  800.  
  801. 1    Click Quick entry on the Merge toolbar.
  802.  
  803. 2    Click in the field you want to edit.
  804.  
  805. If you want to edit dimmed fields, enable the Allow editing of dimmed fields check box.
  806.  
  807. 3    Type text.
  808.  
  809. Notes
  810.  
  811.   If you edit fields with functions, the functions are deleted.
  812.   
  813.   For information about finding data in a data file, see "Sorting, viewing, and finding data in data files."
  814.   
  815. Selecting specific data for merges
  816.  
  817. When you merge documents, you produce copies of the form document. Each copy contains specific information from a record in the data source. If you do not want to merge all the records in a data source, you can limit a merge to certain records in the data file by marking a range of records that you want to merge or by specifying conditions for records.
  818.  
  819.  It is recommended that you use no more than 512 fields per record.
  820.  
  821. To mark records for a merge
  822.  
  823. 1    Click Tools  Merge.
  824.  
  825. 2    Click Form document, and choose the location of the form file.
  826.  
  827. 3    Click Data source, and choose the location of the data file.
  828.  
  829. 4    Click Records.
  830.  
  831. 5    Enable the Mark records option in the Selection method area.
  832.  
  833. 6    Type the range of records to display in the Display records from boxes.
  834.  
  835. 7    Choose the first field to display in the First field to display box.
  836.  
  837. 8    Click Update record list.
  838.  
  839. 9    Click OK.
  840.  
  841.  
  842.  
  843. You can also    
  844.  
  845. Mark individual records    Enable the records in the Record list box.
  846.  
  847. Select all records    Click Mark all records in list.
  848.  
  849. Clear all marked records    Click Unmark all records in list.
  850.  
  851.  
  852.  
  853. To specify conditions for a merge
  854.  
  855. 1    Click Tools  Merge.
  856.  
  857. 2    Click Perform merge.
  858.  
  859. 3    Click Form document, and choose the location of the form file.
  860.  
  861. 4    Click Data source, and choose the location of the data file.
  862.  
  863. 5    Click Records.
  864.  
  865. 6    Enable the Specify conditions option in the Selection method area.
  866.  
  867. 7    Select a field from the Field list box.
  868.  
  869. 8    Type the selection criteria in the Condition text boxes.
  870.  
  871. If you want to see examples of selection criteria, click Example.
  872.  
  873. 9    Click OK.
  874.  
  875.  
  876.  
  877. You can also    
  878.  
  879. Choose a range of records    Enable the Record number range check box. In the From box, type the first record in the range. In the To box, type the last number in the range.
  880.  
  881. Reset conditions    Click Clear all.
  882.  
  883.  
  884.  
  885. Merging with address books
  886.  
  887. When you use an address book as the data source for a merge, you do not have to create a data file. You can merge all records or select specific records from an address book and merge them directly to letters, envelopes, labels, or form documents. By default, WordPerfect lets you access Directory Server, MAPI, and Windows address books through the Microsoft Outlook address book. For more information about using Microsoft Outlook, see "Using Microsoft Outlook address book in WordPerfect."
  888.  
  889. You can also create a merge data file by using the records in an address book. WordPerfect lets you create a data file by using all records or selected ones. When you merge information from an address book, the records are interpreted as a merge data file at the time of the merge. If you want to save address book information as a merge data file, you can use the adrs2mrg.wcm macro included with WordPerfect. For more information about macros, see "Recordings, macros, and automation features."
  890.  
  891. You can merge envelopes with a form document by using an address book. You can also insert address book records as labels.
  892.  
  893. It is recommended that you use no more than 512 fields per record.
  894.  
  895. To merge using an address book
  896.  
  897. 1    In a form document, click Tools  Merge.
  898.  
  899. 2    Click Data source. Choose Address book, and choose an address book from the enabled list box.
  900.  
  901. 3    Click Output, and choose a format for the merged file.
  902.  
  903. 4    Click Merge.
  904.  
  905. Note
  906.  
  907.   If you have selected records from an address book before starting the merge, those are the records that merge unless you specify others.
  908.   
  909. To merge selected records from an address book
  910.  
  911. 1    Click Tools  Merge.
  912.  
  913. 2    Click Form document, and choose the location of the form document.
  914.  
  915. 3    Click Data source, choose Address book, and choose an address book from the list box.
  916.  
  917. 4    Click Records.
  918.  
  919. 5    Hold down Ctrl, click each entry to use, and click OK.
  920.  
  921. 6    In the Format address dialog box, click OK.
  922.  
  923. 7    Click Output, and choose a format for the merged file.
  924.  
  925. 8    Click Merge.
  926.  
  927. To create a merge data file from an address book
  928.  
  929. 1    Click Tools  Macro  Play.
  930.  
  931. 2    Choose adrs2mrg.wcm.
  932.  
  933. 3    Click Play.
  934.  
  935. 4    Enable the All records from address book option.
  936.  
  937. 5    Choose an address book from the Select address book list box.
  938.  
  939. 6    Click OK.
  940.  
  941. To create a merge data file from selected address book records
  942.  
  943. 1    Click Tools  Macro  Play.
  944.  
  945. 2    Choose adrs2mrg.wcm, and click Play.
  946.  
  947. 3    Enable the Selected records option.
  948.  
  949. 4    Click Select records, and click OK.
  950.  
  951. 5    In the list of categories, double-click the type of address book, and click an address book.
  952.  
  953. 6    Hold down Ctrl, click each entry you want to use, and click Insert.
  954.  
  955. 7    In the Format address dialog box, click OK.
  956.  
  957. 8    In the Address book to merge dialog box, click OK.
  958.  
  959. Note
  960.  
  961.   If the adrs2mrg.wcm macro is not listed, you need to install it.
  962.   
  963. To merge envelopes and a form document with an address book
  964.  
  965. 1    Click Tools  Merge.
  966.  
  967. 2    Click Data source, choose Address book, and choose an address book from the list box.
  968.  
  969. 3    Click Envelopes.
  970.  
  971. If there is an existing envelope for this document, you can edit, cancel, or define the envelope.
  972.  
  973. 4    Click where you want to insert a field.
  974.  
  975. 5    Click Insert field on the Merge toolbar, choose a field, and click Insert.
  976.  
  977. 6    Click Close.
  978.  
  979. 7    Click Continue on the Merge toolbar.
  980.  
  981. 8    Click Form document, and choose the location of the form file.
  982.  
  983. 9    Click Output, choose the location for the merged file, and click Merge.
  984.  
  985.  
  986.  
  987. You can also    
  988.  
  989. Merge only envelopes using an address book    Open a blank form document.
  990.  
  991. Print envelopes using an address book    Click Output, and choose Printer. Click Merge.
  992.  
  993. Reset envelope, form, and data options    Click Reset in the Merge dialog box.
  994.  
  995.  
  996.  
  997. Notes
  998.  
  999.   When you merge envelopes with an address book, you cannot add graphics to the envelope. Only the return address, the recipient's address, and a bar code can be used. You can add extra text, such as "Air Mail," below the return address or above the recipient's address. The extra text prints in the same font as the addresses. For more information about creating envelopes, see "Creating envelopes."
  1000.   
  1001.   The merged envelopes are placed at the end of the merged file.
  1002.   
  1003. To insert an address book record as a label
  1004.  
  1005. 1    In a new document window, click Tools  Merge.
  1006.  
  1007. If you have typed in the document, enable the New document window option in the Create merge file dialog box.
  1008.  
  1009. 2    In the Associate form and data dialog box, enable the Associate an address book option, and choose an address book from the list box.
  1010.  
  1011. 3    Click Format  Labels on the WordPerfect menu bar.
  1012.  
  1013. 4    In the List labels for area, enable one of the following label options:
  1014.  
  1015.   Laser printed-displays laser label options
  1016.   
  1017.   Tractor fed-displays tractor fed label options
  1018.   
  1019.   Both-displays both laser and tractor fed label options
  1020.   
  1021. 5    Choose a label format from the Labels list, and click Select.
  1022.  
  1023. 6    Click where you want to insert the address label.
  1024.  
  1025. 7    Click Tools  Address book.
  1026.  
  1027. 8    Choose an address, and click Insert.
  1028.  
  1029. 9    In the Format address dialog box, choose a format from the Format list box.
  1030.  
  1031. Changing merge options
  1032.  
  1033. When you perform a merge, you combine a form document with a data source to form a new set of documents. You can change the default file extensions for merge forms and data files.
  1034.  
  1035. Merge options can be changed. For example, you can specify the number of copies to produce for each merged document. WordPerfect lets you separate each merged record with a page break and insert a blank line for each empty field. You can also reset all of the options to the default.
  1036.  
  1037. To specify an extension for merge filenames
  1038.  
  1039. 1    Click Tools  Settings.
  1040.  
  1041. 2    Double-click Files.
  1042.  
  1043. 3    In the Files settings dialog box, click the Merge/Macro tab.
  1044.  
  1045. 4    Disable the following check boxes:
  1046.  
  1047.   Use default form file extension on open and save
  1048.   
  1049.   Use default data file extension on open and save
  1050.   
  1051. 5    Type an extension in the following boxes:
  1052.  
  1053.   Use default form file extension on open and save-specifies the file extension for form files. The default is .frm.
  1054.   
  1055.   Use default data file extension on open and save-specifies the file extension for data files. The default is .dat.
  1056.   
  1057. To change merge options
  1058.  
  1059.  
  1060.  
  1061. To    Do the following
  1062.  
  1063. Specify the number of copies for each merged record    Click Tools  Merge. Click Options. Type a value in the Number of copies for each record box.
  1064.  
  1065. Separate merged documents with a page break    Click Tools  Merge. Click Options. Enable the Separate each merged document with a page break check box.
  1066.  
  1067. Insert a blank line for an empty field    Click Tools  Merge. Click Options. Choose Leave blank line from the If field is empty in data source list box.
  1068.  
  1069. Remove a blank line representing an empty field    Click Tools  Merge. Click Options. Choose Remove blank line in the If field is empty in data source list box.
  1070.  
  1071. Reset merge options to the default    Click Tools  Merge. Click Reset.
  1072.  
  1073.  
  1074.  
  1075. Note
  1076.  
  1077.   If Reset is disabled in the Perform merge dialog box, all options (envelope, form, and data) are set to the default.
  1078.   
  1079. Using merge commands
  1080.  
  1081. Merge commands (or merge codes) help you customize and automate a merge. Merge commands instruct WordPerfect how to combine data sources and form documents. Like macro commands, they resemble programming languages in the use of a language (syntax), variables, and logical operations.
  1082.  
  1083. You can customize a merge by inserting merge commands. For example, if you add the DATE command to a letter, WordPerfect will replace the [DATE] code with the current date. You can also delete, display, or hide merge commands.
  1084.  
  1085. The POSTNET command can be inserted into a form document. A POSTNET bar code is a postal symbol used for addresses in the United States. WordPerfect inserts the POSTNET bar code for the specified ZIP code. You can insert the same POSTNET bar code for all of the records in a merge, or you can insert a different code for each record in a data file.
  1086.  
  1087. To insert a merge command
  1088.  
  1089. 1    On the Merge toolbar, click Insert merge code, and click More.
  1090.  
  1091. 2    Click where you want to insert a merge code.
  1092.  
  1093. 3    Choose a merge code from the Merge codes list box.
  1094.  
  1095. 4    Click Insert.
  1096.  
  1097. If prompted, type parameters, and click OK.
  1098.  
  1099. Note
  1100.  
  1101.   For more information, see Reference: The Merge toolbar and programming commands in the online Help.
  1102.   
  1103. To delete a merge command
  1104.  
  1105. 1    Click at the beginning or end of a merge command.
  1106.  
  1107. 2    Press DELETE.
  1108.  
  1109. Note
  1110.  
  1111.   When you delete merge commands, WordPerfect will remove the code and parentheses, leaving prompts and parameters.
  1112.   
  1113. To display or hide a merge command
  1114.  
  1115. 1    Click Tools  Settings.
  1116.  
  1117. 2    Click Display.
  1118.  
  1119. 3    In the Display settings dialog box, click the Merge tab.
  1120.  
  1121. 4    Enable one of the following options:
  1122.  
  1123.   Display merge codes-displays the merge commands
  1124.   
  1125.   Display merge codes as markers-displays command markers only
  1126.   
  1127.   Hide merge codes-does not display commands
  1128.   
  1129. Tip
  1130.  
  1131.   You can also click Options on the Merge toolbar to display or hide merge codes.
  1132.   
  1133. To display or hide a merge command for a keyboard merge
  1134.  
  1135. 1    Click Tools  Merge.
  1136.  
  1137. 2    Click Options.
  1138.  
  1139. 3    Choose one of the following options from the Display merge codes list box:
  1140.  
  1141.   Show codes-displays the merge commands
  1142.   
  1143.   Hide codes-does not display commands
  1144.   
  1145.   Show as markers-displays command markers only
  1146.   
  1147. To merge a single POSTNET bar command in a form document
  1148.  
  1149. 1    On the Merge toolbar, click Insert merge code, and click More.
  1150.  
  1151. 2    Click where you want to insert the POSTNET bar command.
  1152.  
  1153. 3    Choose POSTNET(string) from the Merge codes list box.
  1154.  
  1155. 4    Click Insert.
  1156.  
  1157. 5    Type the ZIP code between the parentheses of the POSTNET command.
  1158.  
  1159. 6    Click Close.
  1160.  
  1161. To insert a merge field for a POSTNET bar command
  1162.  
  1163. 1    Click Insert merge code, and click More on the Merge toolbar.
  1164.  
  1165. 2    Click where you want to insert the POSTNET bar code.
  1166.  
  1167. 3    Choose POSTNET(string) from the Insert merge codes list box.
  1168.  
  1169. 4    Click Insert.
  1170.  
  1171. 5    Click between the parentheses of the POSTNET command.
  1172.  
  1173. 6    Click Insert field on the Merge toolbar.
  1174.  
  1175. 7    In the Field names box, choose the field containing the ZIP code.
  1176.  
  1177. 8    Click Insert and close.
  1178.  
  1179. Note
  1180.  
  1181.   To choose a field, you must have associated a data source with the form document. If not, you can type the name of the field, making sure that it matches the field name in the data source. For information about data sources, see "Associating merge files." For information about form documents, see "Working with form documents for a merge."
  1182.   
  1183.  
  1184.  
  1185.  
  1186. 45
  1187.  
  1188.  
  1189.  
  1190.