Wednesday, October 9, 2013

LibreOffice Mail Merge hidden paragraphs

Oh what fun. Why is it always so difficult ? Do devs never use the tools they build ?

Wanted to do a merge document but hidden paragraphs are a pain in the backside.

Say we have a Data Source (for ease I just create a new db from a Spreadsheet - then you can add and change data in the sheet easily) :


So we want

County Postcode

Not all lines are used so we want to lose blank lines.

When we add our fields we get this - we can add a normal Para at the end of the line :

[Accountants_Solicitors.Sheet1.County] [Accountants_Solicitors.Sheet1.Postcode]

To hide a line put the hidden paragraph at the START of the line :

[Hidden Paragraph][Accountants_Solicitors.Sheet1.Address4]

Now, you can edit the 'Condition' of the hidden paragraph to decide when the line is hidden :


If you manually do your labels then don't forget the next record field at the end of each address.

Job done...... just don't ask me how they dreamt it up, especially the 'non printing' pages grrrrrrrr........

No comments:

Post a Comment