Skip to main content
Participant
January 23, 2008
Question

auto Data merge

  • January 23, 2008
  • 24 replies
  • 2533 views
Hallo,

I hope someone can help me? I want to have a JavaScript (eventually vbs) that auto generates a new merged document. If I play the script, Step 1,2 & 4 works. But the most important, step 3, doesnt work. I hope, someone can give the correct code. Thanks!

//OpenDocument.jsx
//An InDesign CS3 JavaScript
//Step1, Opens the document.
var birthDaycard = app.open(File("/c/document/birthday.indd"));
//Step2, Select data
var dmg = birthDaycard.dataMergeProperties;
dmg.selectDataSource(File("/c/document/birthday.txt"));

//Step3, create merged document
var dmd = verKaart.dataMergeOptions;
dmd.createNewDocument;

//Step4, ready
alert ('Done!');
This topic has been closed for replies.

24 replies

Participating Frequently
February 20, 2008
yes jongware it is producing a indesign lock file but i want .indd file to produce.actually my project is to merge data of .csv with .indd and produce new .indd merged document
Jongware
Community Expert
Community Expert
February 20, 2008
This is an open user to user forum. You are not communicating (as in "mailing") to a single person. As soon as you enter a message here, it's visible for the entire world. Everyone logged in to the forums can see the little red flag, signifying some reply to your original question. If that "reply" is just
i you,
repeating the question, or demanding an answer, or complaining "it still don't work no", more than a few times, the average reader of these forums will loose interest in you and your problem.

You seem to assume this data merge thing you want is a well known trick, and everyone here has "the correct script". You want in, so "we" should send you the script. That's what I'm reading in your pleas, anyway. Not so.

In your desperation, you seem to forget a few basic steps. First is a general background knowledge of what you're talking about. A script that produces an indesign Lock file!? Oh, come on! Your script doesn't work. What error does it give? "It does not work" is not an error message.
Participating Frequently
February 20, 2008
hi hendrik can you help me with my problem..iam not getting the output when i run it...please correct it.and send me...actually i want to merge the data of .csv with .indd and produce a new .indd merged document.please give me the script for my application its urgent for me.
Participating Frequently
February 20, 2008
in the above javascript iam not getting the output please edit it send me the correct one
Participating Frequently
February 20, 2008
in the below javascript when run the script iam not getting merged document,but it produce a .indl file(indesign lock file)but i want .indd ,so please correct the below code that produce new .indd document.

/OpenDocument.jsx
//An InDesign CS3 JavaScript
//Step1, Opens the document.
var birthDaycard = app.open(File("/c/pavan/datasheet.indd"));
//Step2, Select data4
var dmg = birthDaycard.dataMergeProperties;
dmg.selectDataSource(File("/c/pavan/datasheet.csv"));

//Step3, create merged document
//dmg.dataMergeProperties.mergeRecords();
dmg.mergeRecords();

//Step4, ready
alert ('Done!');
Participating Frequently
February 20, 2008
please olav iam waiting for reply,please provide me the javascript for merging the .csv data with .indd file
Participating Frequently
February 20, 2008
iam doing in indesign cs3 server,so i need the javascript to merge the data of .csv with .indd file and produce new merged .indd document.
Participating Frequently
February 20, 2008
hi olav can you help me please,my project is to merge the .csv file with .indd (indesign file) and produce final merged document as .indd file using javascript i want to implement in indesign cs3 server
Known Participant
February 19, 2008
Hi sunilkumarrajup,

Use the DataMerge plug-in. It's on the Automation submenu menu of the Window menu. You don't need a script for this.

Thanks,

Ole
Participating Frequently
February 19, 2008
hi olav can you help me please,my project is to merge the .csv file with .indd (indesign file) and produce final merged document as .indd file using javascript my email address is sunilkumarrajup@gmail.com