fabianmoronzirfas
10/6/2012 - 7:54 PM

duplicate page and access first textframe

duplicate page and access first textframe

var doc = app.documents.add();
var page = doc.pages.item(0);
var tf = doc.pages.item(0).textFrames.add({geometricBounds:[0,0,100,100],contents:"A"});
var new_page = page.duplicate();
alert(new_page.name);
var new_tf = new_page.textFrames.item(0);
new_tf.contents = "B";