Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6239
    liushiyan
    Member

    /*
    * 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 < MAX_ERROR_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;

    #9150
    GRC
    Participant

    Thanks liushiyan. Very helpful.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.