Bottom Post
mike scott wrote:
On 9 Aug 2005 at 10:08, Doug Thompson wrote:
...
8< (snip)----
OK, I've had a chance to play around, after reading the document you
suggested. It does look as though OOo goes some way to doing this, but
there do seem to be some problems - either something's not clear to me,
or there are outright bugs. Sorry if what follows is a bit lengthy.
What I'm doing is displaying my address book database (it's just a
spreadsheet) above my experimental document. The database has a field
"Home Phone" which I'm playing with. I type in "hp=", then drag the
database column header down, and then type "=hp" (so I can see field
starts and ends).
The text document now displays (I've got "view fields" enabled)
hp=<Addresses.Sheet1.Home Phone>=hp
I now swipe the cursor across all this to select it all, and hit
control-F2 to get the Field Editor, and select Hidden Text. The Hidden
Text box is prefilled with "hp=<Home Phone>=hp" (note loss of the path
in the database). I drag the database column header down to the
condition box, and prefix with "not " - the condition now reads
not [Addresses.Sheet1.Home Phone]
and click insert and close. I drag the "Home Phone" header onto a new
line to see what happens without the condition.
The text area now shows (all highlighted as a field as field shadings
is turned on)
Hidden text not [Addresses.Sheet1.Home Phone] hp=<Home Phone>=hp
Addresses.Sheet1.Home Phone
I then run this through the mail merge.
Here's the first hiccup - it's not possible to get everything into a
single file - OOo insists on generating one file per database entry.
But never mind, worse to come!.......
Now the files for those records with no home phone entry have two blank
lines - that's fine. However those with a phone entry are incorrect.
The second line is fine - it displays the correct phone number each
time. But the first, conditional, line always displays the literal text
hp=<Home Phone>=hp
and I can find no way of getting the database entry substituted
correctly. (I've tried editing the text in the Fields Editor box to no
avail - I just get literal text every time). (Oh, I've also just found
out about the "data to fields" button on the beamer - same result but a
bit quicker :-) )
In passing, if I try this with a template file instead of a plain
writer file, OOo names all the resulting files as .stw instead of .sxw.
:-(
Maybe I'm missing something, but could use more help please! Thanks.
Generating a document (file) per database record is exactly the way mail
merge is supposed to work. The objective is to create multiple tailored
copies of a document, each copy going to a different addressee.
However, using the Mail Merge Wizard, you are presented with three
options for output, one of which is to save everything to one file.
I don't have an answer to your problem with the phone numbers. What you
describe looks as if it should work as you expect. This may be a
reportable error. As for the display of literal text only, I suspect
that is the nature of "hidden text" and "conditional text" as
implemented. I haven't worked much with those functions, but last time
I tried, I had similar results trying to use variables.
To use the templates, you will have to "Open a document from template"
then save it as a document file. This shouldn't be a problem, because
all I was suggesting is that you save the portion that uses the data
fields as the template, then create your mail merge document from that.
Lastly, I don't recall if you mentioned it earlier, but I gather from
the file extensions that you're using OOo 1.1.x. You might want to take
a look at one of the recent betas. I think you'll find much improvement
in how and how well mail merge works.
I have been trying to send this reply all day. It looks like they
finally got the mail server fixed.
Regards,
Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]