I'm having some problems with using textWrapOffset.
mySelection.textWrapPreferences.textWrapOffset = 20;
In the above code, the first alert outputs the four existing text wrap offsets (e.g. [3, 0, 0, 0]). But after attempting to change the top textWrapOffset in the second line of code, the last alert still outputs the old text wrap offset, and doesn't show the change. It's as if the textWrapOffset is read only. Or is there something that I'm missing?
Note that before running the script, the object selected in InDesign is a simple "Rectangle" object.
Hope someone can help!
The value has to be set as an Array.
myTextWrapOffset = mySelection.textWrapPreferences.textWrapOffset; myTextWrapOffset = 20; mySelection.textWrapPreferences.textWrapOffset = myTextWrapOffset;
Thanks very much, Harbs, that was perfect. I didn't know that InDesign's objects' arrays had to be assigned values in that way -- I've learnt something new!