[hblug] Mail Merge Aficionados?

Michael Adams linux_mike at paradise.net.nz
Sun Feb 3 16:08:57 NZDT 2008


On Sun, 03 Feb 2008 15:06:02 +1300
Perry Spiller wrote:

> ----------------Earlier, Michael commented--------------------
> >Base will happily use your spreadsheets as a database source.
> >
> >Mailmerge is a tricky beast in OO.o but the manual to the rescue:
> >http://documentation.openoffice.org/manuals/oooauthors2/
> 
> Hmmm, not at all easy, it seems.
> 
> The data source seems to be the easy matter. The mail merge
> document is the killer. OO seems very restricted: letters,
> labels & envelopes.
> 
> Windoze at least offers a catalogue option (which is what
> I want) but the conditional instructions are, aahhhhh,
> challenging.
> 
> It seems to be able to test records _ maybe, but unable to test
> fields within records. The test-record option only (seems to)
> allow an "equal to" test _ not "contains." I can't make it
> work, which has me wondering if the "equal to" test will
> return a false, if there are other characters in the field,
> including spaces. (I doubt that, though)
> 
> In 'long-hand,' here's a sample of what I'm trying to achieve.
> Bracketed words signify <field name>
> 

Don't you want to just extract a report in the database and use the
report for your merge data. Never done it in OO.o, sorry.

I think you'll find that your "equal to" accepts a regular expression
(also called RegEx or pattern). Think *.exe and *.jpg multiplied by any
level of complexity you like up to 1000. OO.o has a help page on
patterns.
Heres a relatively simple one i've used in PHP for validating email
addresses:
^([a-z0-9_'+*$%\^&!\.\-])+\@(([a-z0-9\-])+\.)+([a-z0-9:]{2,4})+$
Don't worry there are tutorials but i think the report method would
probably be smarter :)

I would cast your net wider for expertise if you are getting stuck still
after looking into RegEx's and reports. Try the OpenOffice.org users
list. You don't need to be a list member to post, Non-members posts are
moderated (by a human) so wait one or two days for the replies to come
in. If you join up to the list expect 70 - 100 emails a day.
http://www.openoffice.org/mail_list.html

-- 
Michael

All shall be well, and all shall be well, and all manner of things shall
be well

 - Julian of Norwich 1342 - 1416



More information about the HBLUG mailing list