/*
* Author: 641
* Version: 0.1
* Descript: Copy Search Results To New document
*/
// move to StartOfDocument
document.selection.StartOfDocument();
// temp variable
var fullstr = ”;
// error control
var error_control_num = 0;
var MAX_ERROR_NUM = 1000;
// get all search result
while(document.selection.FindRepeat(eeFindRepeatNext) && error_control_num
{
str = document.selection.Text;
fullstr = fullstr + ‘n’ + str;
error_control_num ++ ;
}
// copy to new file
editor.NewFile();
doc = editor.ActiveDocument;
doc.selection.Text = fullstr;