Help!! Problem instantiating WORD object using C#.
Hi experts,
I am trying to open the content of a WORD file from C#.NET which resides in the REMOTE SERVER, however, when declaring new Word.ApplicationClass(), I get an error:
"System.Runtime.InteropServices.COMException: Server execution failed"
When I see the event viewer in the web server, the error is:
"The server did not register with DCOM within the required timeout. "
string fileName = this.btnWorkOrder1.Value;
object readOnly = false;
object isVisible = false;
object saveChanges = false;
object missing = System.Reflection.Missing.Value;
object dynamic = 2;
//error here:
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref isVisible);
Does anybody know how to solve it? Please help I'm desperate!!!
Thanks alot!!!
Handy Mulia
|