#5505
Yutaka Emura
Keymaster

drcasa wrote:
Hi. What I am trying to accomplish is to search through an open document looking for a specific series of characters then copy that entire line into an open empty document. The macro should then go back to the first document and continue the search. I have been able to record the sequences of the macro that search for text, highlight the entire line then copy it but I have not been able to then swap to the other open document to perform the paste. I can manually swap to the other document via CTRL+TAB but that is not entered into the macro.

Thanks,
Dave

Please refer to the Help, and you will find Next Document command in the Command section:
http://www.emeditor.com/help/cmd/window/next_window.htm

Then, you will find the corresponding macro will be:

editor.ExecuteCommandByID(4245);

which is missing because this command is not recorded by EmEditor automatically. You will need to insert this line at the missing place. Alternatively, you can use Documents Collection and Document Object to enumerate documents and activate a selected document.