1 <?xml version="1.0" encoding="utf-8"?>
2 <page xmlns="http://projectmallard.org/1.0/" xmlns:e="http://projectmallard.org/experimental/" type="guide" id="mergefeatures" xml:lang="pt-BR">
5 <link type="guide" xref="index#merging"/>
6 <revision pkgversion="3.0" version="0.1" date="2010-05-04" status="incomplete"/>
8 What you may expect from a document merge.
10 <credit type="author">
11 <name>Jim Evins</name>
12 <email>evins@snaught.com</email>
14 <credit type="author">
15 <name>Mario Blättermann</name>
16 <email>mario.blaettermann@gmail.com</email>
19 <p>Creative Commons Share Alike 3.0</p>
23 <title>Performing a document merge</title>
25 <p>Document Merge (sometimes called "Mail Merge") is a powerful
26 feature that allows a unique label or card to be printed for each
27 record in an external data source.</p>
29 <p>The first step to performing a document merge is to prepare
30 a source document that contains your merge data. This data could
31 be mailing addresses or any other data that you wish to create
32 unique labels or cards for. Currently back-ends only exist for
33 text files and the evolution data server -- others are planned. The currently
34 supported text-file format is very simple: each line is a record;
35 fields are delimited by commas (CSV), tabs, or colons; and newlines
36 can be embedded into fields by using the "\n" entity. This file
37 could be created using any text editor or could be created by
38 another program or script. A common way of creating CSV files is
39 to export them from a spreadsheet program or from address book
42 <note style="advanced">
44 To export a CSV file from <app>kaddressbook</app>, first select the
45 contacts you wish to export. Click on the first contact, then press and
46 hold <key>Ctrl</key> and click on the other desired contacts to select them.
47 Then choose <guiseq><gui>File</gui><gui>Export</gui>
48 <gui>Export CSV File</gui></guiseq>.</p>
51 In the <gui>Select Contacts</gui>
52 window, enable the button <gui>Selected contacts</gui> (which should be
53 enabled by default anyway). Then click on <gui>OK</gui>.
54 In the <gui>Save As</gui> dialog, choose the desired folder and a name
55 for the file and click on <gui>Save</gui>.
59 <note style="advanced">
61 To export a CSV file from <app>Thunderbird</app>, click on the
62 <gui>Address Book</gui> toolbar button or choose <guiseq><gui>Tools
63 </gui><gui>Address Book</gui></guiseq> from the menu.
64 Then select the contacts you wish to export. Click on the first contact,
65 then press and hold <key>Ctrl</key> and click on the other desired contacts
66 to select them. Then choose <guiseq><gui>Tools</gui><gui>Export</gui>
70 In the file chooser window, choose the desired folder and a name
71 for the file and change the value of the drop-down button in the
72 right bottom corner to <gui>Comma Separated</gui>. Finally, click on
77 <p>A label must then be configured to "point at" this data file.
78 To configure the merge properties of a document, choose
79 <guiseq><gui>Objects</gui>
80 <gui>Merge Properties</gui></guiseq> menu item
81 to display the <gui>merge properties</gui> dialog. This
82 dialog is used to select the exact data file format and file
83 name (location) of the merge data.</p>
85 <p>Finally, once the label has been configured for a data file,
86 field keys can be inserted into text objects and used as source
87 or data for barcode objects and image filenames for image objects.
88 See <link xref="editprop"/> for more information
89 on using merge data for these object types.</p>
91 <p>Now that your label is configured, <app>gLabels</app> will print a unique
92 label for each record in your source document -- substituting fields
93 from each record for field keys in the all text, barcode, and
96 <p>See <link xref="merge"/> for a detailed
97 tutorial on the document merge feature.</p>