Empty fields in mail merge/labels.

2014-04-22 Thread Dave Barton
A client asked me a question I am unable to answer, or find definite
information about. I suspect the answer will be not possible, but
wanted to check with you folks first.

In mail merge and labels there is a work-around to skip empty lines, but
is there a hack to skip empty fields within an otherwise populated line?

The data file includes:
Title, Firstname, Joint, Partner, Surname, Label, Address1, Address2,
Suburb, State, Postcode.

Assuming a label design:
Title, Firstname, Joint, Partner, Surname,
Address1
Address2
Suburb, State Postcode.

Some recipients have partners and some do not. The field Joint
inserts €œand Mrs€. Some have house or property names which go in
Address1.

Fully populated fields result in:

Mr Alpha and Mrs Bravo Smith
The Place
1 High Street
Somewhere Here 1234

But empty Joint, Partner  Address1 fields for single people
results in:

Mr Alpha (space) (space) (space) Smith
1 High Street
Somewhere Here 1234

FWIW. I am told (not been able to check) that in MS Works all empty
fields are skipped.

The solution I put forward was to put the partner name on a separate
line, left blank when not needed, but this does not satisfy the client's
requirements.

Any other thoughts, suggestions or pointers to a solution would be welcome.

TIA
Dave



---
List Conduct Guidelines: http://openoffice.apache.org/list-conduct.html
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org



Re: Empty fields in mail merge/labels.

2014-04-22 Thread Martin Groenescheij

You need Conditional text for each field that could be empty.
When you have an empty field you also need to make the space between the 
words conditional.
For empty paragraphs an Hidden Paragraph (don't forget to deselect the 
View Hidden Paragraph).
The fields and conditions are shown below, for readability I have each 
field on separate lines.


*Title*
*Firstname*
Conditional text
Insert Function Conditional text
Condition: /{your doc}.{your sheet}.Joint EQ /
Then: //
Else: /and /
*Joint*
Conditional text
Insert Function Conditional text
Condition: /{your doc}.{your sheet}.Joint EQ /
Then: //
Else: / /
Conditional text
Insert Function Conditional text
Condition: /{your doc}.{your sheet}.Partnert EQ /
Then: //
Else: / /
*Partner*
Conditional text
Insert Function Conditional text
Condition: /{your doc}.{your sheet}.Partnert EQ /
Then: 
Else:  
*Surname*
*Address1*
Conditional text
Insert Function Hidden Paragraph
Condition: /{your doc}.{your sheet}.Address2 EQ /
*Address2*
*Suburb*
*State*
*Postcode*

On 23-4-2014 2:24, Dave Barton wrote:

A client asked me a question I am unable to answer, or find definite
information about. I suspect the answer will be not possible, but
wanted to check with you folks first.

In mail merge and labels there is a work-around to skip empty lines, but
is there a hack to skip empty fields within an otherwise populated line?

The data file includes:
Title, Firstname, Joint, Partner, Surname, Label, Address1, Address2,
Suburb, State, Postcode.

Assuming a label design:
Title, Firstname, Joint, Partner, Surname,
Address1
Address2
Suburb, State Postcode.

Some recipients have partners and some do not. The field Joint
inserts €œand Mrs€. Some have house or property names which go in
Address1.

Fully populated fields result in:

Mr Alpha and Mrs Bravo Smith
The Place
1 High Street
Somewhere Here 1234

But empty Joint, Partner  Address1 fields for single people
results in:

Mr Alpha (space) (space) (space) Smith
1 High Street
Somewhere Here 1234

FWIW. I am told (not been able to check) that in MS Works all empty
fields are skipped.

The solution I put forward was to put the partner name on a separate
line, left blank when not needed, but this does not satisfy the client's
requirements.

Any other thoughts, suggestions or pointers to a solution would be welcome.

TIA
Dave



---
List Conduct Guidelines: http://openoffice.apache.org/list-conduct.html
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org