The process cannot access the file because it is being used by another process

Hi,
I used the below code for opening the document:
Dim filename as String=“test1.doc”
Dim rejectedfilepath as String="\rejectfolder" & filename
Dim filepath as String="\testfolder" & filename

Dim loadOptions As New LoadOptions(LoadFormat.Doc, password, “”)
Dim document As Document = New Document(filepath , loadOptions)

After opening the document for processing, due to some condition I want to move the word document from “filepath” to “rejectedfilepath” using “System.IO.File.Move(filepath, rejectedfilepath)” but it is throwing the error as:
“The process cannot access the file because it is being used by another process”.

Thanks in advance for help.

@harshamanil,

After an initial test with the licensed latest version of Aspose.Words for .NET i.e. 19.8, we were unable to reproduce this issue on our end.

In case the problem still remains on your end, please also create a simplified standalone console application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it along with source Word document here for testing. We will then start further investigation into your issue and provide you more information. Thanks for your cooperation.

Hi Awais,

I am using Aspose.Words of license version 3.0 and i tried to implement the same in Asp.Net web application. Can you please try with the version 3.0 in Asp.net web app.

Thanks in advance.

@harshamanil,

I am afraid, we do not provide support for older released versions of Aspose.Words. Also, please note that we do not provide any fixes or patches for old versions of Aspose APIs either. All fixes and new features are always added into new versions of our APIs. So, please upgrade to the latest version i.e. 19.8. Hope, this helps.