This is the easiest and most complete document recovery method. Always try it first. Save the file in Rich Text Format (RTF). This format preserves the formatting in your Word for Mac document. After you save the file in RTF, reopen the file in Word for Mac, and then convert it from RTF. Cannot Save a File in Microsoft Word. Here's the steps when you've got your document open and you can't save your file. If you are trying to save your file to a floppy disk. Do NOT end task or end process on Word! Let your PC sit a few seconds to completely shut down. You should be given the opportunity to. When you save your file, the original file is then deleted and the temporary file is renamed with the original file name. If this process is interrupted, your file may not be saved properly or you may find one or more temporary files in the folder where you tried to save your file.

Use

This is certainly not particular to word and really common every period you wirte ány file on á drive: 'You cannot save while the file can be in usé by another procéss'. This just indicates there is usually a Handler made in some way to 'take hand' on the existing file before having to save it 'as' (i actually.age) duplication it. This possibly occurs because your 'savé as' process is certainly trying to acces thé file in writé mode even if it is simply to copy it.

I suppose you require to make sure your file is certainly freed from any resource before trying to save it 'mainly because'. - Feb 9 '12 at 18:29.

If the program code is not bursting out of your ForEach probably you would wish to refactor thé foreach into á for cycle and have got a cycle fixed on a count number.

What you need to do is to figure out the process which is holding the file open. To discover this out you need to download Procedure Explorer from SysInternals (today component of Microsoft). This will allow you to research all the processes to find out which types have open up handles to your file. Of training course it may be that the file clash is associated to a much less apparent file such as a settings or lock file.

In that situation Process Monitor (furthermore from SysInternals) should allow you to find what will be declining. Both are usually brilliant equipment and once you have got utilized them they will become part of your armóury. If you operate your code the initial period - it's possible will be okay. But it's obvious that file will be not disposed properly. Standart.world wide web GC doesn't works on Interop objects correctly. Therefore, few suggestions: 1) Perform not create public qualities with Interop.Term.Document or Interop.Word.Application. Make use of them in your methods and disposé ASAP.

2) The 2nd reason to near Program ASAP can be that RPC server offers timeout. If you keep Application open for a whiIe it will be automatically shut off from RPC server and you'll not be capable to usé it. With this in mind, you have to call apword.Quit; in lastly statement, not in capture and apword = null on your own isn't sufficient. If program has ended up close down with mistake - destroy word process for certain. And don't forget about to call wordDocuments.Close up(ref SaveChanges) before causing the technique.