CloseFile NoSave macro for multiple files

CloseFile NoSave macro for multiple files

5
NewbieNewbie
5

    Jul 22, 2005#1

    Hello

    Im looking for a macro that can close all open documents with CloseFile NoSave.
    I tried to create a macro, but I can't seem to get the looping right.
    It always hangs on the last document.

    Larre

    6,675585
    Grand MasterGrand Master
    6,675585

      Re: CloseFile NoSave macro for muliple files

      Jul 22, 2005#2

      That macro does it, but only for named files. New "files" which are not saved at least once will not be closed.

      Loop
      IfNameIs ""
      ExitLoop
      EndIf
      CloseFile NoSave
      EndLoop
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Jul 22, 2005#3

        Thanks Mofi

        It's those new "files" which are not saved at least once that I need this macro for. I normally do my more complicated oracle stored procedures in several steps, and I tend to have one not saved file for each step.

        So if you have a solution for not saved files you would make my day.

        6,675585
        Grand MasterGrand Master
        6,675585

          Jul 24, 2005#4

          OK. Here is the macro which closes all opend files, independent of save state.

          Loop
          Top
          IfColNum 1
          CloseFile NoSave
          Else
          ExitLoop
          EndIf
          EndLoop
          Best regards from an UC/UE/UES for Windows user from Austria