Hi
I have a text frame -- I resize the text frame vertically so there is plent of room. I paste text into it using:
ps = sourceFrame.parentStory.texts[0]
sel = ps.characters.itemByRange(begin,end);
sel.duplicate(LocationOptions.AFTER,destinationframe.parentStory.inse rtionPoints[-1]);
which works fine. The text appears with a Paragraph symbol at the end, as well as the# end of file marker.
I then resize the frame using
gb=frame.geometricBounds;
gb[2]=frame.lines[-1].baseline;
frame.geometricBounds=gb;
which SOMETIMES resizes the bottom to align with the bottom of the last line of text (as desired) with the # overset.
Sometimes the # appears on the last line by itself, and the frame resizes to below the # (not desired action)
If I then select the frame and run the following:
frame=app.selection[0];
gb=frame.geometricBounds;
gb[2]=frame.lines[-1].baseline;
frame.geometricBounds=gb;
it resizes properly.
Any idea WHY?
TIA