Mailmerge page throws

asked 2019-04-11 20:30:00 +0200

slithytove gravatar image

I have a Base database, which is updated frequently. Regularly I need to produce updated reports from the database. An SQL query pulls together the relevant info, and I use Mailmerge referencing the query to add additional text and formatting not held in the database, and print to file. This all works fine apart from one thing: the mailmerge output has paragraph markers with an insert page break before set after each record, which in this case I don't want. I want the output records to appear sequentially, with just an ordinary paragraph break between them.

This wouldn't matter much if I could select the whole document, go to Format/Paragraph/Text flow and clear the check box next to Insert break, and it would apply to all selected paragraphs, but for some reason this doesn't work. The marker is cleared only for the first selected paragraph. All others stay unchanged. The listing has several hundred records, so it isn't feasible to select them one by one and clear the check boxes individually.

I have an ugly fix for this: I replace all the paragraph markers (using a regular expression) by some string that doesn't otherwise occur (">>>" is good in my case), then do another regular expression replace of >>> by \n. But the time has come that I need to hand this over to someone non-technical to continue, and I don't really want to have to tell them about regular expressions.

Is there a way either to stop Mailmerge inserting the page breaks, or to do a "clean" global edit of the output?

I'm currently using LibreOffice 6.0.6.2 on Win10, but this problem has existed for around 10 years on all versions of LibreOffice and OpenOffice that I've run over that time. I recall the OpenOffice Mailmerge output was different in detail, which meant slightly different regular expressions, but the issue was the same.

edit retag flag offensive close merge delete