- for (i=0; i<app.activeDocument.stories.length; i++)
- app.activeDocument.stories[i].pointSize -= 0.5;
(Note that all text in the story gets the same size. I hope that is not a problem with your text.)
Yes, he specifies that all text in the story will get the same size text applied.. but it is a simple modification to add a for() loop to run lines 4 and 5 through each paragraph in the story rather than the full story. Try this and see how it goes.
I've tried to loop through paragraph styles but I get an error that tells me the object does not support the property paragraphStyles.
Not sure how to access paragraph styles from a story.
YES! I worked it out, thanks Skemicle for the advice, it feels much better having figured it out myself.
This is the code:
for (i=0; i<app.activeDocument.stories.length; i++)
app.activeDocument.stories[i].paragraphs[j].pointSize -= 0.5;
I would assume this is what you were wanting instead of actually changing the point size of the general paragraph style.. but if you did want to change the paragraph style completely, (all text with the paragraph style would become smaller instead of just the overflowing story) You would use:
1 person found this helpful
One thing to remember, if text frames are grouped the above code will not work...