Monday, July 2, 2018

Vertical Justification Undo

Vertical Justification Undo


Already, I need a second script that will walk through a column restoring the space before to that used by assigned paragraph styles. This is an easy fall-out from the previous script. Instead of the spreadText() function, I have an unSpreadText() function that looks like this:
function unSpreadText(theText) {
 for (var j = theText.paragraphs.length - 1; j > 0; j--) {
  theText.paragraphs[j].spaceBefore = theText.paragraphs[j].appliedParagraphStyle.spaceBefore;
 }
}
Well, that was easy.

go to link download