Copy link to clipboard
I have used this code to find the textframe count but it shows an script error. Please guide me
var myDoc = app.activeDocument;var myText= 0;for (var i = 0; myDoc.stories.length > i; i++)myText += myDoc.textFrames[i].texts.lengthalert("Document contains " + myText + " textframe.");
This will count all text frames, including the ones placed in any master page.
This code to me seems to be incoherent. Why do you iterate stories and then check the text length and conclude that it would be the frame count. Try to find answers to the following question