home *** CD-ROM | disk | FTP | other *** search
/ Windows Shareware GOLD / NuclearComputingVol3No1.cdr / _bbs3 / f1238.zip / SAVESEL.TXT < prev    next >
Text File  |  1991-01-17  |  914b  |  39 lines

  1. Sub MAIN 
  2.  
  3. REM                                          **   SAVESEL -- Save Selection as Text Only   ** 
  4. REM                                                           by Jeff DeTray CIS 76117,2127 
  5.  
  6. REM -- Copy selection to new document 
  7. EditCopy 
  8. FileNew .NewTemplate = 0, .Template = "NORMAL" 
  9. EditPaste 
  10.  
  11. REM --  Open  File Save As dialog box 
  12. Dim dlgrec As FileSaveAs 
  13. GetCurValues dlgrec 
  14. dlgrec.Format = 2 
  15. GetName: 
  16. Err = 0 
  17. On Error Goto Oops 
  18. Dialog dlgrec 
  19. Super FileSaveAs dlgrec 
  20. FileClose 2 
  21. Goto Quit 
  22.  
  23. REM -- Error processing for CANCEL button 
  24. Oops: 
  25. If Err = 102 Then 
  26.     Beep 2 
  27.     Save = MsgBox("Do you want to save the selected text?", "Save Selection As Text", 36) 
  28.     Print Save 
  29.     Select Case Save 
  30.     Case - 1 
  31.         Goto GetName 
  32.     Case 0 
  33.         FileClose 2 
  34.         MsgBox("Selection was not saved.", "Save Selection As Text", 64) 
  35.     End Select 
  36. End If 
  37. Quit: 
  38. End Sub 
  39.