#6900
Yutaka Emura
Keymaster

Pancho wrote:

You should be able to do this by using the Find method (of the Selection object) with eeFindReplaceOpenDoc parameter to search all open documents.

I do not want search to all open documents, only active(current document)

How to get all text document in Selection object ?

document.selection.SelectAll();
str = document.selection.text;

right ? As without the allocation of the entire text (like Ctrl+A) ?

If you just want to search for selected text (or a word if not selected), how about pressing CTRL + F3? To do this with a macro, you can use:


document.selection.FindRepeat(eeFindRepeatNext | eeFindRepeatWord);