Copy link to clipboard
Copied
I am having trouble with variable-length data merges overlapping with each other. It appears this is not a new thing, and was addressed (and solved) in this thread. I have made a single text box formatted the way I would like. The problem is that the script is not working for me.
The script should take the single-item merged documents and stitch them together. When I run the script, I get the error "Error string: app is not defined." I am a real beginner, so it's possible, I made a mistake with the script, but it was just a copy-paste thing... so I don't know. I made a txt file with the .idjs extension with this as the text.
function main(){
var doc = app.documents.everyItem().getElements();
var n = doc.length;
if(!n){
alert("You need a document");
return;
}
doc = doc[0];
var tfs = doc.pages.everyItem().textFrames.everyItem().getElements();
n = tfs.length;
while(n--){
if(n==0) break;
tfs[n].previousTextFrame = tfs[n-1];
}
}
var u;
app.doScript("main();", u, u, UndoModes.ENTIRE_SCRIPT, "Merge textframes");But I get an error.
Any help would be appreciated.
Thank you!
Hi @Benjamin39010368auuu, it is an easy fix I hope. Just change the script's file extension to ".js" because the code is ExtendScript, not UXP.
- Mark
Copy link to clipboard
Copied
Hi @Benjamin39010368auuu, it is an easy fix I hope. Just change the script's file extension to ".js" because the code is ExtendScript, not UXP.
- Mark
Copy link to clipboard
Copied
Easy fix indeed! Thanks for the help!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now