Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5587
    nickb
    Member

    Hello,

    Is it possible to run a macro for all opened files? Let’s say I want to delete all lines containing WATER, FIRE, EARTH, and WIND within 100 files. I can make a macro to delete those lines, but I have to open each file separately and run the macro (to much work). So is it possible to open 20 files (the more the better!) and run the same macro for all?

    thx

    #5589
    Yutaka Emura
    Keymaster

    nickb wrote:
    Hello,

    Is it possible to run a macro for all opened files? Let’s say I want to delete all lines containing WATER, FIRE, EARTH, and WIND within 100 files. I can make a macro to delete those lines, but I have to open each file separately and run the macro (to much work). So is it possible to open 20 files (the more the better!) and run the same macro for all?

    thx

    Yes! Here is the code:


    docs = new Enumerator( editor.Documents );
    for( ; !docs.atEnd(); docs.moveNext() ){
    doc = docs.item();
    doc.Activate();
    // do something with doc
    }
    #5591
    nickb
    Member

    thx for the help! It works! :-)

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