Performing selective mail merge in Writer

NoOp glgxg at mfire.com
Tue Jun 5 22:24:57 UTC 2007


On 06/05/2007 03:06 PM, Gabriel Dragffy wrote:
> On Sun, 2007-06-03 at 22:14 -0700, NoOp wrote:
>> On 06/03/2007 04:04 AM, Gabriel Dragffy wrote:
>> > Hi
>> > 
>> > Hope someone can help me, please.
>> > 
>> > I have a MySQL database, which, thanks to NoOp, I have completely 
>> > integrated into open office.
>> > 
>> > The database contains company address details. However some should be
>> >  emailed while others sent snail mail. To overcome this there is a
>> > column named 'mail' which can be 'True' or 'False' - if a company has
>> > 'True' set then they should be sent snail mail.
>> > 
>> > Getting all of the addresses out of the database that need to be sent
>> >  snail mail is very simple: SELECT * FROM database.table WHERE
>> > mail='True'
>> > 
>> > The thing is if I do mail merge using Writer it will create letters
>> > for all the companies, including those that don't necessarily have 
>> > addresses. Is it possible to get Writer to only do mail merge for 
>> > companies that have 'mail' set to 'True'?
>> > 
>> > Thanks
>> > 
>> > Gabe
>> > 
>> > 
>> 
>> Assuming that you've registered the address source:
>> 
>> Tools|Mail Merge Wizard
>> Once you get to 3. Insert Address Block, use the 'Select Different
>> Address List' button. Select your address source and click the Filter
>> button. Filter on Field Name 'mail', Condition = true, etc. That will
>> filter only the mail=true data.
>> 
>> 
> 
> Hi again NoOp
> 
> I have the database registered, however I didn't use the mail merge
> wizard (I think it sucks badly), I just viewed data source (F4), and
> then dragged and dropped the fields I wanted. It works really well, I'm
> just not sure what I should do now I have done that :(   Seems I can't
> have my cake and eat it! :(
> 

Sure you can... go back to Base and create a Query for information in
the database where mail=true then save. The Query will show up when you
do F4 in Writer.

As before, drag the column headings into the Writer document from the
Query. I suggest that you turn on View|Field Shadings so that you can
easily see the fields in the document. So for instance, you are creating
a form letter and you drag in the following for your address:

<first_name> <last_name>
<address1>
<address2>
<city>, etc.

Now type your form letter below.

Salutation etc.

Now File|Print
You will be notified that your document contains address database fields
and asked if you want to print a form letter. Say yes. You can then
select the registered database, select certain records, select all
records, or select records from 1 to x.

Note: I *highly* recommend that you print to a cups-pdf virutal printer
a few times until you get the hang of it so that you don't waste paper &
ink.





More information about the ubuntu-users mailing list