- AuthorPosts
- March 18, 2008 at 10:18 am #5587nickbMember
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
March 18, 2008 at 3:54 pm #5589Yutaka EmuraKeymasternickb 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
}
March 18, 2008 at 6:58 pm #5591nickbMemberthx for the help! It works! :-)
- AuthorPosts
- You must be logged in to reply to this topic.