Answered
How to reduce selection by ¶ mark?
Dear all,
When a selection contains the ¶ mark, then the TR.end.offset is 0. If i manually reduce the selction to not contain the ¶ mark, then I get a reasonable value (e.g. 279).
How can I programmatically reduce the selection? I have tried the following, but this does not work
#target framemaker
main ();
function main () {
var TR = app.ActiveDoc.TextSelection;
if (TR.end.offset == 0) {
$.bp(true); // this provides a huge end.offset, not a reasonable value
TR.end.obj = TR.beg.obj;
TR.end.offset = Constants.FV_OBJ_END_OFFSET;
}
}
