• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Data Merge Multiple Entries in Single Text Box

New Here ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

Is there a quick and easy way to set up the data merge so in will insert multiple entries into a single text box? As an example, a phone directory is set up in an Excel file with different fields for name, phone and address. I want to merge the entries with particular formatting (bold for the name, italics for the address, etc.) and also want all of the entries in a single text box that I can flow from one page to another. I am trying to avoid linking the text boxes are copying and pasting after the merge as there are many entries and would be rather time consuming.

TOPICS
How to

Views

599

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 20, 2020 May 20, 2020

Hi timw63166087,

there is no option in the user interface for this kind of work.

However it can be done by script.

 

Do your data merge with a template that has one single text frame holding the data merge fields.

Do a data merge so that for every result is one single page.

 

Run the ExtendScript ( JavaScript ) code below that will thread all text frames to one story.

Then select all text in that story and copy it over to your target text frame.

 

Prerequisites for the script:

[1] Active InDesig

...

Votes

Translate

Translate
Community Expert ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

LATEST

Hi timw63166087,

there is no option in the user interface for this kind of work.

However it can be done by script.

 

Do your data merge with a template that has one single text frame holding the data merge fields.

Do a data merge so that for every result is one single page.

 

Run the ExtendScript ( JavaScript ) code below that will thread all text frames to one story.

Then select all text in that story and copy it over to your target text frame.

 

Prerequisites for the script:

[1] Active InDesign document.

[2] Exactly one text frame on every page.

 

var doc = app.documents[0];
var numPages = doc.pages.length;

for( var n=0; n<numPages-1; n++ )
{
	doc.pages[n].textFrames[0].nextTextFrame =
	doc.pages[n+1].textFrames[0];
};

 

Regards,
Uwe Laubender

( ACP )

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines