Cutting and Pasting Formatted Text
I have a script that searches for text with an outline color, removes the outlnie color, cuts it from the main "body" text, adds an anchored frame, applied an object style to that frame and pastes the cut text in the frame.
Everything works great except that it is REALLLLLLYYYY SSSSSLLLLLOOOOOWWWWW.....
I'm wondering two things. 1, is there a way to cut text without havnig to select it first (which seems to be a slow point) and keep any current formatting, and 2, is there a way to get InDesign to stop jumping to the page on which the cutting is occurring? It looks like InD scrolls the pages when the cut occurs.
My code looks roughly like this (VBA, InD CS3).
I define the text area so search
Set SChar = InD.Selection(1).ParentStory.Characters(InD.Selection(1).InsertionPoints(-1).Index)
Set EChar = InD.Selection(1).ParentStory.Characters(-1)
Set SrchTxt = InD.Selection(1).ParentStory.Texts.ItemByRange(SChar, EChar)
Set up my search stuff here...
Then execute the search as such:
Set Foundd = SrchTxt(1).FindText
I thought about using something like Foundd(i).cut or trying to simply set the text of the new frame to the text of the old frame but didn't see a way to do that and keep any potential formatting.