Data Merge in InDesign CS3

Hello everyone,

I am having trouble doing some advance data merge with InDesign CS3.
Hope someone can help me, the dead line is just round the corner :-(

I have a huge list of names and addresses as CSV. Some of them have physical addresses and some of them have P.O. Boxes.
So I have some columns that are empty, depending on which information is supplied by my customers.
When I start a data merge I get empty lines because I need to set up all variables, but not all are populated throughout the CSV.
I need to print the whole job in one go because of rebates on post code order.

Hope you understand what I mean.

Any idea on how to truncate complete lines within the address field?
If Indesign CS3 doesn't give me that kind of control, what options would I have instead? Could I export the CSV in a way that I get the full address blocks and truncate empty lines in doing so?

Any idea is highly appreciated!

Thanks
PrinterGuy
 
Normally I do some cleaning in excell before doing the data merge.
Check out the InDesigner.com podcast on data merge, if you haven't allready Michael Murphy has a great way to teach the complicated.
Also don't forget about GREP. Sometimes using Datamerge and then a GREP clean up is the best way... not allways good to use one tool, some times two or three tools will do a better job faster.
 
When you bring up the Create Merged Document window in InDesign, click on the 3rd tab at the top (Options). There is a check box that will remove blank lines for empty fields.
 
Thanks for your ideas. The "remove blank lines for empty fields" doesn't do what I want it to do. When I have a blank column in my CSV it which I have assigned a address line to, I get a blank line within my address.

Example

John Simple

Frankfurt
Germany


instead of:

John Simple
Frankfurt
Germany


I can't fix it within InDesign and I realize InDesign is not meant to do complex mail merge.
Planet Press is much better suited for that kind of stuff.

Cheers

PrinterGuy
 
PrinterGuy, I would have to see your source files, however it may be easier for you to look at a job that does work as intended and see if you can format in a similar way.

The preview is incorrect even when the remove blank fields checkbox is active, however, when you actually do the merge - all should be well!

Please refer to the attached .zip file (.xls & .csv, .indd pre-merge in CS3 and final .indd output in CS3).


Hope this helps,


Stephen Marsh

Binary FX: Photoshop Tech Vault 3.0
Prepression
 

Attachments

  • data merge test.zip
    712.6 KB · Views: 201
Make sure "Preserve Spaces in Data Source" is unchecked in the Data Source Import Options along with "Remove Blank Lines for Empty Fields".

Erik
 
It's not so difficult to make a GREP search for double paragraph returns and replace with single paragraph return…*don't even need GREP for that search and replace.
 
Data Merge problem

Data Merge problem

Hi can anyone help me as it's getting quite frustrating.

I'm trying to do a merge with around 1300 address. The problem i have is, some people on the list have a prefix before their name and others don't. So when the merge is made, the ones without the prefix just have a character space before their name.

I've tried unchecking the relevant boxes to get rid of unwanted space but to no avail, thanks in advance,

Joel
 
EDIT: OK, I did a quick test, yes, spaces are left.

In the past I have done a find/replace to fix these on the final multi-page merged document.

This may involve "creative use" of find/replace - such as swapping multiple word spaces for a fixed white space such as an "en" space, then removing en spaces, so as not to affect regular spaces (or vice versa).

If I knew GREP, then this would probably be easier! GREP hurts my head, I have never found any good free resources using simple examples of common fix-ups.


Stephen Marsh
 
Last edited:
Another way that I have dealt with this is to combine the title and name fields in the spreadsheet, before doing the data merge.

In Excel/OpenOffice/NeoOffice the formula to merge three columns together is as follows:

=A1&" "&B1&" "&C1

So insert a new column to work in (say column D). Use the formula to combine row 1, column A/B/C into the newly inserted working column.

(Presuming that A1 is the title and B1 is the given name and C1 is the family name). This formula will put a word space between each column.

One can then copy the formula and paste special (formula only) onto all the records (row 2 to 1300 etc). Then delete the original colum A/B/C as the new column D has the merged title/name. Then you can just datamerge this single column.

Sounds complex, but it is pretty fast and easy once you get the hang of it.

EDIT: Do a find/replace for multiple spaces and convert them to single spaces in the .csv or the final merged InDesign file, if you still hapen to have double or tripple word spaces.


Stephen Marsh
 
Last edited:
Another option with "creative use of find/replace":

In the source .csv file, replace all word spaces with a character that is not used in any of the text, such as a hyphen.

Then do the data merge.

On the merged file, do a find/replace and change any word space with say an "end nested style" non-printing character (no white space is used by this character).

Then do a find/replace to change the hyphens to a word space.

This will overcome the extra white space in front of the name when there is no title.


Regards,

Stephen Marsh
 

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top