OK — that’s probably a better way to code it. While I disagree with indices changing, I’ll accept it, but I’d like it clarified in the documentation for Documents.Item. Also it’s unclear that Documents Item indices go from 1 to Documents.Count, rather than 0 to Documents.Count-1.
Finally, I still with there were a way to activate a document by using its name, e.g., editor.Documents.Item(“MyDoc.txt”).Activate(). Check out how Excel uses either names or numbers to index its Workbooks, Worksheets, Charts, etc., collections. It would make for shorter and more reliable code.