Word:Close/Delete synchronisation problem

T

tartancli

Hi,

I have some kind of synchronisation problem. In my Word Add-in, I wan
to close a file and then delete it. I use code as follows,

// Close the file
pDoc.Close(ref saveChanges, ref missing, ref missing);

// Delete the file
System.IO.File.Delete(pDocStr);

This works fine for a small file, but for a very big file I catch a
exception that says that "the file x.doc being used by anothe
process".

Anybody any suggestions for handling the synchronisation
 
Top