blob: 3dad6b3caebb09480d67dd9b3f16910a2b2b4501 [file] [log] [blame]
<html><head>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
</head>
<body>
<h2 align="center">&nbsp;</h2>
<h2 align="center">&nbsp;</h2>
<h2 align="center">How to do a &quot;Mail Merge&quot; from a Calc spreadsheet.</h2>
<h2 align="center">&nbsp;</h2>
<h5 align="center" ><i>provided by</i></h5>
<h5 align="center" ><i>the OpenOffice.org Documentation Project</i></h5>
<div id="Table of Contents1">
<div id="Table of Contents1_Head">
<p></p>
<p></p>
<p></p>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><B>Table of Contents</B></h3>
<ol>
<li><A HREF="#1"><SPAN STYLE="font-weight: medium">Creation of the Database
Source</SPAN></A></li>
<li><A HREF="#2">Creation of the Mail Template</A></li>
<li><A HREF="#3">Merging</A></li>
<li><A HREF="#4">Tricks about the Mail Pagination</A></li>
<li><A HREF="#5">Credits</A></li>
</ol>
<h3><A NAME="1"></A> <B>1. Creation of the Database Source</B></h3>
<P>To do a Mail Merge in OpenOffice.org, you have to transform your spreadsheet
into a database source, so that you'll be able to display it inside the Beamer.</P>
<P>When you have completed your spreadsheet with the needed data, click on <b>File-Save</b>
to save it, in the .sxc format, in the directory you wish. Now, you can close
your sheet. </P>
<P>In the <b>Tools menu,</b> select <B>Data sources...</B></P>
<P><a href="data%20source%20administration%20window"><img src="data_sources.GIF" width="743" height="419" alt="data sources window" border="0"></a><BR CLEAR=RIGHT>
<BR>
</P>
<P>To the left, you can see the data sources already created and registered from
the Data Sources Manager. You only have to browse up to the position, where
you saved yours, and select it.</P>
<UL>
<LI>
<P>Click on '<B>New Data Source</B>'.</P>
<LI>
<P>To the right, you can type a name for it.</P>
<LI>
<P>Under <B>Connection</B>, choose the Type of the document that you will
use as the Data Source. Here, in the drop-down list, choose '<B>Spreadsheet</B>'.</P>
<LI>
<P>In the <B>Tables</B> tab, verify that your spreadsheet name has been selected.</P>
<LI> Then, click on '<B>OK</B>' and your sheet will be usable for a Mail Merge.
</UL>
<p><b><i>Hint: </i></b><i>This method can be used to register into OpenOffice.org
Suite whatever supported data source type you already have present on your system.</i></p>
<h3><A NAME="2"></A> <B>2. Creation of the Mail Template</B></h3>
<OL>
<LI>
<P>Open a new text document : <B>File &#150; New &#150; Text</B> </P>
<LI>
<P>Type the content of your letter. You don't need to insert the address fields
in this moment. You can type an asterisk (*), as a place-holder, to orient
yourself when you have completed your letter.</P>
<LI>
<P>Once you have completed the letter; save it, but <strong>don't</strong>
close the file.</P>
<LI>
<P>From the '<B>View</B>' menu, select '<B>Data Sources</B>' (or hit the <B>F4
</B>key.)</P>
</OL>
<P><IMG SRC="mail2.gif" NAME="Image2" ALIGN=LEFT WIDTH=450 HEIGHT=255 BORDER=0 alt="data sources"><BR CLEAR=LEFT>
Your registered data sources will be displayed in the Beamer and you only have
to select the source with which you wish to work:</P>
<UL>
<LI>
<P>Click on the little cross, next to your data source name, to display its
content tree. Then, by clicking on the name of a table, you will see displayed
the fields and their records in the right side of the Beamer.</P>
<LI>
<P>Now, you have to add the fields into your document.</P>
<LI>
<P>Click and hold on the field, <B>Name</B> (or whatever your field is named),
of your table.</P>
</UL>
<P><img src="mail3.gif" width="412" height="251" alt="data source selection"><BR CLEAR=LEFT>
<BR>
<BR>
</P>
<UL>
<LI>
<P>Holding the mouse button down, drag it up to the asterisk placeholder in
your document and release it. The field will be displayed in your document
area:</P>
</UL>
<P><IMG SRC="mail4.jpg" NAME="Image4" ALIGN=LEFT WIDTH=218 HEIGHT=168 BORDER=0 alt="example"><BR CLEAR=LEFT>
<BR>
</P>
<UL>
<LI>
<P>Repeat this action for the field <B>Surname</B>. Change the line position
to insert the other address fields.</P>
</UL>
<P>When you have inserted all your fields, you're ready for the merging.</P>
<h3><A NAME="3"></A> <B>3. Merging</B></h3>
<OL>
<LI>
<P><IMG SRC="mail5.jpg" NAME="Image5" ALIGN=LEFT HSPACE=5 WIDTH=178 HEIGHT=92 BORDER=0 alt="record selection">Select
the records you need: </P>
<LI>
<P>If you wish to select all records, click on the rectangle at the upper
left corner of the table. <br>
Alternately, if you wish to select all the content of a field, you can click
on the heading of the field.<br>
Finally, if you wish to select all fields of a record, click on the gray
rectangle displayed to its right. A small arrow will be displayed and the
record will be highlighted.<BR>
To select records that are not consecutive, hold the <B>CTRL key </B> down
while making your selections.</P>
</OL>
<P>Now, you can do your merging.</P>
<P>On the Toolbar of the Beamer, the icon before the last displays some letters.
Click on it to access the sorting tools:</P>
<P><IMG SRC="mail6.jpg" NAME="Image6" ALIGN=LEFT WIDTH=526 HEIGHT=34 BORDER=0 alt="Beamer Toolbar"><BR CLEAR=LEFT>
<BR>
<BR>
</P>
<P>You'll access the window below:</P>
<P><img src="mail7.gif" width="700" height="188" alt="Mail Merge Window"></P>
<UL>
<LI>
<P>Sort the records, as you have selected them, in the previous procedure.</P>
<!-- rh: Should 'Let' be changed to 'Sort', for this sentence? -->
<LI>
<P>Then choose the device to which output is to be directed. <BR>
If you choose <b>&#145;File&#146;</b>, as in our example, you have to select
the file path by clicking on the button with 3 points to the right of the
<b>'Path'</b> text box, so you can browse your file system up to the file
you wish to use. </P>
</UL>
<P>There will be a file created for use with the records selected. You can name
this file according to whichever field name of your data source.</P>
<P>Now the operation is terminated and the merging completed!</P>
<h3 STYLE="margin-bottom: 0.5cm; text-decoration: none; page-break-before: always"><A NAME="4"></A>
<B>4. Tricks about the Mail Pagination</B></h3>
<P>You may find It difficult, using this method, that your mail template be perfectly
displayed. Are all names correctly contained in the lines you wish? Is there
some space lacking in a field? How can you avoid blank lines, when some addresses
only require one line while others require two lines? These are only a few of
the questions that we'll answer below.</P>
<P ><FONT SIZE=4><I>How can you control the pagination of your mail template?</I></FONT></P>
<P>You can display the records in your document before merging them.</P>
<P>To do so, look at the Toolbar of the Beamer :</P>
<P><img src="mail6.jpg" name="Image8" align=LEFT width=526 height=34 border=0 alt="Beamer Toolbar"><BR CLEAR=LEFT>
<BR>
<BR>
</P>
<P>The third icon from the right is called &#145;<B>Data to Fields</B>&#146;.
</P>
<P>Select a record and click on the icon, the fields of your mail template will
be filled with the selected record data.</P>
<P>You can repeat the action as many times as you need to control the pagination
and to adjust your mail template so that all addresses are correctly displayed.</P>
<P>You don't need to select the records again after you have done your checks.</P>
<h4><I>How to eliminate the blank address lines?</I></h4>
<P>Let's say that in our template, the field &#145;<B>ADDRESS_2</B>&#146; doesn't
contain data in every record.</P>
<P>Place the cursor before the field &#145;<B>ADDRESS_2</B>&#146; in your mail
template. Press the key combination <B>CTRL+F2</B> to open the fields dialog
window.</P>
<P>Switch to the &#145;<B>Functions</B>&#146; tab .</P>
<P><img src="fields_window.GIF" width="633" height="465" alt="fields_window"><BR CLEAR=LEFT>
<BR>
<BR>
</P>
<P>Select the field style &#145;<B>Hidden Paragraph</B>&#146; and insert as Condition
&#145;<B>not(field name)'</B>. In our example it will be not(ADDRESS_2). Then
click on the <b>'Insert' </b>button to insert your function into the document.</P>
<div>
<h3><b><a name="5"></a>5. Credits</b></h3>
<p><b>Author</b> : Sophie Gautier</p>
</div>
<div>
<p><b>Thanks</b> : Richard Holt, great proof reader and OOo contributor</p>
</div>
<div>
<p><b>Intgr by</b> : Gianluca Turconi</p>
</div>
<div>
<p><b>Last modified</b> : February 16, 2002</p>
</div>
<div>
<p><b>Contacts</b> : <span style="font-weight: medium">OpenOffice.org Documentation
Project </span><a href="http://documentation.openoffice.org/index.html"><span style="font-weight: medium">http://documentation.openoffice.org/index.html</span></a></p>
</div>
<div>
<p><b>Translation</b> : Gianluca Turconi</p>
<p>&nbsp;</p>
</div>
<P>&nbsp;</P>
</body>
</html>