How to access a textFrame with label?
hi All, I have approx 20 pages in a document and want to empty for a new monthly issue. I have assinged labels to each textframe e.g. One, Two, Three, Four etc. I am using following script but I want to access a particular textFrame using label directly without loop something like below.
var myFrame = myDoc.pageItems.itemsByID(2034); // something for a textFrame with script label "One".
This is the script:
var myDoc = app.activeDocument;
var i;
var myFrame = myDoc.textFrames;
for (i=0; myFrame.length; i++)
{
Switch (myFrame[i].label)
case "One":
myFrame[i].characters.itemByRange(24, -1).remove(); // here i want few lines
case "Two"
myFrame[i].contents = ""; // no text in the frame
case "Three"
myFrame[i].contents = ""; // no text in the frame
and so on
}
