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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top