Sub MAIN REM ** SAVESEL -- Save Selection as Text Only ** REM by Jeff DeTray CIS 76117,2127 REM -- Copy selection to new document EditCopy FileNew .NewTemplate = 0, .Template = "NORMAL" EditPaste REM -- Open File Save As dialog box Dim dlgrec As FileSaveAs GetCurValues dlgrec dlgrec.Format = 2 GetName: Err = 0 On Error Goto Oops Dialog dlgrec Super FileSaveAs dlgrec FileClose 2 Goto Quit REM -- Error processing for CANCEL button Oops: If Err = 102 Then Beep 2 Save = MsgBox("Do you want to save the selected text?", "Save Selection As Text", 36) Print Save Select Case Save Case - 1 Goto GetName Case 0 FileClose 2 MsgBox("Selection was not saved.", "Save Selection As Text", 64) End Select End If Quit: End Sub