find applied paragraph style
Hi Guys,
This script used to work and now it says this line is undefined...
if ( (paras
.appliedParagraphStyle).name.toLowerCase() == "heading 1" ).
this is the part of the script that's failing, what is going wrong?
var newDoc = app.activeDocument,
frame = newDoc.textFrames.everyItem().getElements();
for ( var c = 0; c < frame.length; c++ ) {
var paras = frame
for ( p = paras.length; p >= 0; p-- ) {
if ( (paras
.appliedParagraphStyle).name.toLowerCase() == "heading 1" ) {
paras
.convertBulletsAndNumberingToText(); // convert the heading 1 paragraph style numbers to text
}