Hi,
so lets include a function paraStepper():
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = ":\\s*\r."; // to match 2 paras - end & start
var myDoc = app.activeDocument,
mFound = myDoc.findGrep(),
len = mFound.length, currPara; while (len--) { currPara = mFound[len].paragraphs[0]; if (currPara.bulletsAndNumberingListType != ListType.BULLET_LIST){ currPara = paraStepper(currPara); while (currPara) { currPara.words[0].characters[0].changecase(ChangecaseMode.UPPERCASE); currPara = paraStepper(currPara); } } }
function paraStepper (para){ var mRes = false, story = para.parentStory, next = story.paragraphs.nextItem(para); if (next.isValid && next.bulletsAndNumberingListType == ListType.BULLET_LIST) mRes = next; return mRes; }
app.findGrepPreferences = app.changeGrepPreferences = null;
Jarek