Copy link to clipboard
Copied
Hy guys, please someone should help me with a script to do this.
I want to find a text frame with paragraph style “CASES” across my documents of more than 500 pages, then change the text frame vertical alignment option to “center”.
I.e.
From This
To This
Thanks
{Renamed by MOD}
Is there anything about the frame you can search for via Object settings, using the Find Object dialog box?
If not, rudimentarily (Change 'P Style Name to Find' to the paragraph style name in question):
var tfs = app.activeDocument.textFrames.everyItem().getElements();
for (var i = 0; i < tfs.length; i++) {
try {
if (tfs[i].insertionPoints[0].appliedParagraphStyle.name == "P Style Name to Find") {
tfs[i].textFramePreferences.verticalJustification = VerticalJustifica
...
Copy link to clipboard
Copied
Is there anything about the frame you can search for via Object settings, using the Find Object dialog box?
If not, rudimentarily (Change 'P Style Name to Find' to the paragraph style name in question):
var tfs = app.activeDocument.textFrames.everyItem().getElements();
for (var i = 0; i < tfs.length; i++) {
try {
if (tfs[i].insertionPoints[0].appliedParagraphStyle.name == "P Style Name to Find") {
tfs[i].textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN;
}
} catch(e){}
}
Copy link to clipboard
Copied
Wooow,
It worked perfectly well just like magic. Everything happened in 3 seconds.
Really appreciate bro.
Am seriously excited.
Thanks you.
Thank you
Thank you.