You can write a textual region to a file with the write action statement. You can write a textual region or a colored textual region to an ASCII text file or to a color-attributed file. You can create a new file, replace the contents of an existing file, or append to the contents of an existing file.
When a textual region is written to a file, only the text is written to the file. If you then read the file back into a textual region, the text assumes the font of the textual region into which it is copied. None of the write statements change the textual region in any way; for example, if it is visible when the write statement is executed, it will remain visible.