: Batch Export a textbox in Indesign I have to send out of InDesign 50 versions of the same ad, everything is the same in each of these 50 ads except for one small key number down the bottom
I have to send out of InDesign 50 versions of the same ad, everything is the same in each of these 50 ads except for one small key number down the bottom in a textbox that changes for each instance.
Is there a way to export one instance from InDesign 50 times but use a CSV or something similar to determine the numbers?
More posts by @Hamaas979
2 Comments
Sorted by latest first Latest Oldest Best
You can achieve this with scripting. Just do your add on a master spread and create 50 pages from it. Then take a look at this example I wrote and modify it to your needs. You need to add the strings you need and also change the coordinates of the text box.
I wrote some explanations into the code.
/* global app */
var doc = app.activeDocument; // get the current doc
// these variables are the bounding box coordinates of your text box
// x1,y1 the upper left
// x2,y2 the lower right
var x1 = 10;
var y1 = 10;
var x2 = 100;
var y2 = 50;
// now loop all pages
// this assumes your doc is set up and
// on each page there is the add where
// you want to add the alternating box
//
// you could have an array with that much entries like you
// have pages in your document like this
//
// var mycontents = ['String page 1', 'String page 2', 'and so on …'];
//
for(var i = 0; i < doc.pages.length; i++) {
var page = doc.pages[i]; // get the current page
// and add a text box to it
// the box has geometric bounds and some content in in object
//
// {}<-- This is an object
//
// if you had that array you could exchange the `contents:` value for
// the contents array like this
// contents: mycontents[i]
page.textFrames.add({
geometricBounds: [y1, x1, y2, x2],
contents: 'This is where your content belongs'
});
}
Difficult to explain in detail since this will be a customization of your document, but you need to research "Data merge", which is a feature that allows you to have a master document with variable text boxes taken from CSV's.
FYI: helpx.adobe.com/indesign/using/data-merge.html
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.