Help!! Problem instantiating WORD object using C#.NET

From: Handy Mulia (HandyMulia_at_discussions.microsoft.com)
Date: 05/31/05


Date: Tue, 31 May 2005 00:10:03 -0700

Hi experts,

I am trying to open the content of a WORD file from C#.NET which resides in
the REMOTE SERVER, however I get an error:
"System.Runtime.InteropServices.COMException: Server execution failed"
when declaring new Word.ApplicationClass().

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!!!

Thanks alot!!!

Handy Mulia



Relevant Pages

  • Re: COMException: Word cannot print.
    ... pointing to the remote server. ... > Does the account have a real user profile ON the server? ... >> oWordApp.PrintOut(ref missing, ref missing, ref missing, ref missing, ref ...
    (microsoft.public.office.developer.vba)
  • Help!! Problem instantiating WORD object using C#.NET
    ... I am trying to open the content of a WORD file from C#.NET which resides in ... the REMOTE SERVER, ... "System.Runtime.InteropServices.COMException: Server execution failed" ... Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref ...
    (microsoft.public.dotnet.framework)
  • Help!! Problem instantiating WORD object using C#.NET
    ... I am trying to open the content of a WORD file from C#.NET which resides in ... the REMOTE SERVER, ... "System.Runtime.InteropServices.COMException: Server execution failed" ... Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref ...
    (microsoft.public.dotnet.framework.aspnet)
  • Help!! Problem instantiating WORD object using C#.NET
    ... I am trying to open the content of a WORD file from C#.NET which resides in ... the REMOTE SERVER, ... "System.Runtime.InteropServices.COMException: Server execution failed" ... Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref ...
    (microsoft.public.dotnet.general)
  • Help!! Problem instantiating WORD object using C#.NET
    ... I am trying to open the content of a WORD file from C#.NET which resides ... in the REMOTE SERVER, ... "System.Runtime.InteropServices.COMException: Server execution failed" ... Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ...
    (microsoft.public.dotnet.languages.csharp)