Target specific TextFrame with a particular name
My Indesign file has few hundred pages.
On the master page I have created one text frame and named it as "myframe"
A paragraph style of "apage_no" is applied to this text frame. Currently it does not have any content exept the style of "apage_no" is applied.
apage_no style description
--------------------------------
Font: Adobe Arabic
Size: 14pts
Bullets and Numbering : Numbers with ^#
Alignment : Centre
I have unlocked the textframe ("myframe") on document pages.
Now I am running this script to add a hair space to this particular text frame ("myframe") using the following script. Its not giving any error but its not working either.
=== Script ===
myDoc = app.documents[0];
var txtFrame = myDoc.textFrames.everyItem().getElements();
for(var i = 0 ; i < tf.length; i++)
{
if(txtFrame.name == "myframe")
{ txtFrame.insertionPoints[-1].contents = "hair space"; }
}
##i will use unicode of hairspace which I dont have handy
=== End ===
What am I missing ?
Thanks
