Override master page text frame with specific paragraph style
Hi everyone!
I have this code that override all text frames from master pages in a document
var doc = app.activeDocument;
for (var i = 0; i < doc.pages.length; i++) {
var page = doc.pages;
if (page.appliedMaster !== null) {
for (j = 0; j < page.appliedMaster.textFrames.length; j++) {
try {
page.appliedMaster.textFrames
.override(page); } catch(e) {}
}
}
}
But I want to override only the text frames with specifics paragraph styles applied. How can I achieve this?
Thank you in advance!