var myDoc = app.documents.item(0);
var myPages = myDoc.pages.textFrames.everyItem().paragraphs.everyItem().getElements();
for (i =0; i<myPages.length; i++)
var myPage = myPages [i];
if (myPage == bulletsAndNumberingListType.BULLET_LIST.appliedParagraphStyle.name("BL"))
It is shows error.
kanaga kumar. k
Tip for beginners:
NEVER, EVER SAY "IT SHOWS AN ERROR"
without saying what error. It is right there, on your screen. Why not tell us what it says?
You may say, "if you run my script you will see it" but that is not true. Here is an example: I run your script and I get the error:
Object is invalid
(..) Line: 2
THat is because I did not have a document open when running. (And if this is your error as well, the solution is simple.)
Hi Kanaga Kumar,
Try the below code:
app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.bulletsAndNumberingListType = ListType.BULLET_LIST; app.changeGrepPreferences.appliedParagraphStyle = "CN"; app.activeDocument.changeGrep(); alert("Process Completed")