Yutaka Emura

nickb wrote:

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?


Yes! Here is the code:

docs = new Enumerator( editor.Documents );
for( ; !docs.atEnd(); docs.moveNext() ){
doc = docs.item();
// do something with doc