R
Raj
Hi,
I am facing a problem in my .NET code. I have a global
class in which I have a function that opens the word
application, creates a document in the specified location.
Then I say word.quit and return true to the calling
appliation.
In my code behind file, I call this global function to
create the doc. After the global function returns true, I
use the stream object to read the data(from the newly
created word document) into a variable of type byte.
The problem occurs at this stage when I use the stream
object to open the document and read the contents. The
exception error being shown is "The document cannot be
accessed as it is being used by another process".
What I could understand is that the word application is
still accessing this document while I try to open with the
stream object. So the 2 processes conflict. I tried
introducing some delay in between this but still at lot of
times it shows the error. It behaves absurdly!!
PLease let me know how can I tackle this problem. I am in
a real tight situiation and any help/suggestion will be
greatly appreciated.
With regards,
Rajesh
I am facing a problem in my .NET code. I have a global
class in which I have a function that opens the word
application, creates a document in the specified location.
Then I say word.quit and return true to the calling
appliation.
In my code behind file, I call this global function to
create the doc. After the global function returns true, I
use the stream object to read the data(from the newly
created word document) into a variable of type byte.
The problem occurs at this stage when I use the stream
object to open the document and read the contents. The
exception error being shown is "The document cannot be
accessed as it is being used by another process".
What I could understand is that the word application is
still accessing this document while I try to open with the
stream object. So the 2 processes conflict. I tried
introducing some delay in between this but still at lot of
times it shows the error. It behaves absurdly!!
PLease let me know how can I tackle this problem. I am in
a real tight situiation and any help/suggestion will be
greatly appreciated.
With regards,
Rajesh