Expand Overset Text Boxes In Indesign with Applescript

Do you ever have to expand a large number of text boxes in Indesign that contain overset text? Do you wish there was a better way? Well here it is. Great for headings!

tell application "Adobe InDesign CS6"
    set myAllPageItems to every text frame of every page of active document whose overflows is true
    repeat with theItem in myAllPageItems
        tell text frame preferences of theItem
            set auto sizing reference point to top center point
            set use minimum height for auto sizing to true
            set use no line breaks for auto sizing to true
            set auto sizing type to width only
        end tell
    end repeat
end tell
display dialog "Done!"

Will search for text boxes with overset text and auto size them width-wise without line breaks.

As seen here

With thanks to Walt Sterdan for streamlining the code. Modify as needed.

Note: If you’re having problems with validation, odds are the straight quotes in the Applescript have been defaulted to curly quotes. Make sure the quotes are simple straight quotes.

No comments

Powered by Blogger.