Aspose cannot read document that is still opened using MS Word


At present it is not possible to open a document using Apose, when it is allready opened in MS Word. (It results in a sharing violation).

Is it possible to change Apose to allow it to open such documents?
It is very annoying during testing to have to close the original word document each time I change something. I also use passwords on the original documents making it even more annoying when I have to make a lot of changes and want to check whether they work correctly.


Sorry, but it is MS Word who opens the document exclusively. We cannot change this behavior and it it is not possible to open file, which is being blocked by other application.


But it is possible to copy a document that is opened in MS Word using the explorer. Can Aspose “copy” the file before opening it?


Yes, you are right. That approach might work. Maybe we will add such functionality to Aspose.Words in the future.

Meanwhile you can use this approach in your own code as a workaround:

string filename = Application.StartupPath + @"\AlreadyOpenedDoc.doc";

File.Copy(filename, filename + ".tmp", true);

Document doc = new Document(filename + ".tmp");

Thanks for a good idea!