This content has been marked as final. Show 4 replies
You need to do more than empty the frame; you need to empty its parent story. This is particularly true if the frame you're duplicating is the last in the present story because in that case not only does the text in the frame get duplicated but also all the overset text.
So, after duplicating the frame, you need either:
myDupeFrame.parentStory.contents = "";
as the mood takes you. Then thread the empty frame to the end of the original story.
Works great now. Thanks, yet again.
Only if you've got a moment, one thing I'm curious about is the .Remove command. I'm working in VB and it generates an error. I tried simplifying things just to check the command and selected a text fame with text in it and tried simply
With a zero in the "Texts" parameter I got "requested member of the collection does not exist." I THINK that is a difference between JS and VB, JS uses zero as the first element, VB uses 1. Using a 1 though causes a "Object doesn't support this propery or method" error.
Any idea why?
On the other hand, if that does happen, you shouldn't be adding a frame at that point anyway. If you test for story overflow before duplicating the frame, you should never get to the point where you added an empty frame, should you?
I realized after I'd posted that you were talking VB while I was answering in JS.
VB collections are 1-based, while JS collections are 0-based.
Therefore, there's no such this as Texts(0) in VB. You need to change it to Texts(1).