Re: [Clip] Switch to new doc with same content
- --- In email@example.com, "John Shotsky" <jshotsky@...> wrote:
>Try replacing the middle two lines with:
> I found a solution that seems to work. Not sure if it's
> the most straightforward way to do it, but it works.
> In case anyone else needs something like that:
> ^!Set %NewFile%=^$GetDocName$.txt
> ^!Select ALL
> ^!TextToFile "^%NewFile%" ^$GetSelection$
> ^!Open "^%NewFile%"
^!TextToFile "^%NewFile%" ^$GetText$
Here are the docs for GetText: "Returns the whole text contained in the active document."